Adapter for Pentax lenses
I have Pentax thread mount lenses and I've seen adapters for M42 lenses.
Is Pentax thread mount an M42 lens?
BUT you also have to consider how the aperture on the lens is set. A fully manual/preset lens can probably be used with any m42 adapter. Most lenses are automatic and have a pin extending out the rear that needs to be depressed to close the aperture, so the adapter needs the right size flange to catch this pin.
Some lenses have a pin but also a switch to set the lens into manual mode, and won't need a flange.
You have to be careful choosing an adapter with the right flange configuration for your lenses.
The Pentax SMC Takumars, with M42 screwmount are fully manual and have no pin.
That's not true of all the M42 lenses. Many have a pin, and for those lenses the difference between "manual" and "auto" isn't that the camera can select the aperture as part of its automatic exposure function, but that the camera can tell the lens when to stop down to the aperture selected on the lens ring.
In those days, a "manual" lens was one that was always stopped down to the selected aperture, even when viewing - while an "automatic" lens was one that remained fully open most of the time and only stopped down to the (manually) selected aperture when the shutter was triggered.