The first Pentax K-mount are the "k" lenses they are by far the best, having been built like the old screwmount all metal construction. They were designed for the K1000,KX,andK2. The next set were the"m" series the same thing as the "k" scaled down a little in build quality, and size for the MX, ME, ME SUPER, MG, and LX. The "a" series were made for the PRogram Plus and Super program and can have the Apreture set on the body to work in program modes. Really the best way to go is K-mount lenses and I would not worry with the M,K,or A model just get what is cheapest,and works for you. The exception is for a few certain lenses, I suggest you visit Boz's sight on K-mount pentaxs as he has the best information around. One thing I have found from various peoples lens tests on the net is that the older K 3.5 135, and 28, 35 out perform the more modern A series f 2.8.
Boz's sight : http://www.bdimitrov.de/kmp/