You are correct - the number entered should be equal or less than the focal length of the lens. This is for the Shake Reduction. If you turn off SR, it will not ask you for the focal length. Zooms depend on the range you typically will be using.
Please refer to the following threads. They should answer all your questions. And welcome to the joys of using legacy lenses on you Pentax Digital Camera.
https://www.pentaxforums.com/forums/pentax-lens-articles/110657-how-use-meter...k-x-k-7-a.html https://www.pentaxforums.com/forums/pentax-dslr-camera-articles/100260-manual...ic-lenses.html
PS: Be sure Auto ISO is not selected.