If the primary thing is cost, I'd look for a name brand non-dedicated Auto - Thyristor flash. Going super cheap isn't a good option as I've heard of disastrous failures like flash units blowing up and such.
Auto Thyristor flashes don't communicate with the camera for exposure, rather they have a sensor on the flash unit which sees the light reflected back towards the camera and shuts down the flash when it senses enough light. Not as sophisticated as those that meter through the lens, but before dedicated TTL, pros relied on this type of flash for years.
You do have to preset the aperture and ISO speed in the camera and match it with the setting on the flash, but you'll have a significant range of distances where the exposure will be pretty close or right on, so you won't have to constantly change settings as subject distance changes. Not as "automatic" as the newer flashes, but not that much of a hassle.
The most recommended model that comes to mind is the Sunpak 383 -- available new for @ $80.
Used flashes of this type are plentiful, but some have trigger voltages that might fry your camera -- a useful site is :
http://www.botzilla.com/photo/strobeVolts.html
it also tells you how to measure the voltage if the flash you're considering is not listed. The accepted max voltage for Pentax DSLRs seems to be @ 30V -- to be safe, I'd go lower.
I'd also look at dedicated TTL flashes for and from any mfg that have an Auto mode. An example from Pentax is the AF280T. Though it's normally considered a dedicated TTL flash and won't work in TTL mode, it will in Auto, and I use it in that mode with my K10. I recently won one on ebay for @ $50 -- a very good flash at a very low price.
Hope that helps.
Scott