Like it says on the front ring, that's a Super Takumar 50mm f/1.4. All of the versions of the lens are grouped together in the lens review forum:
Pentax Lens Review Database - 50mm F1.4
I've got one that's very similar with a serial number just under 2.2 million. Worth buying an M42 to K adaptor for if you don't already have one for your current body.
If you don't like the yellow leave the lens in a sunny (but preferably not too hot) window for about a week with aluminum foil lining the rear lens cap and the front cap off and it should clear right up again. After about a year of being stored in its case when not in use mine is starting to turn yellow again.