Hey, welcome! Okay, so lets start at the beginning.
50mm f1.7 means the maximum aperture (lowest f-number) is 1.7 at 50mm focal length. There is only one focal length listed, so the lens has a fixed focal length. It has no zoom, the frame is fixed. Its called a prime. Maximum aperture depends on the size of the front element and the focal length. More on this later
17-50mm f2.8 means the lens has a zoom range from 17mm to 50mm (so it goes from wide angle to tele), and maximum aperture of f2.8 throughout. Its a zoom lens with constant aperture. Zoom lenses tend to have slightly lower image quality than primes, but they have a convenient, flexible zoom range. Modern lens designs are also so good, that the image quality of certain zoom lenses matches prime lenses. These tend to be higher-end zoom lenses.
18-135mm f3.5-5.6 means the lens zooms from 18mm up to 135mm, and the maximum aperture is f3.5 at 18mm and f5.6 at 135mm. It also changes throughout, so at 50mm it might be f4, for example. So if you zoom to 135mm, you cannot choose f3.5. It is a variable aperture zoom lens, because the aperture varies depending on the focal length. This lens design is slightly easier and more compact than a fixed aperture zoom, but it is not quite as useful since you get a lower aperture at the tele end. So these tend to be zoom lenses that put convenience over image quality, though some variable aperture zoom lenses are still quite great.
Maximum aperture is the lowest f-number, which is also the brightest photo and the shallowest Depth of Field. All lenses with an aperture mechanism can be stopped down, this means you choose a higher f-number, and the aperture blades inside the lens close to make the hole smaller. Less light passes and the DoF in the photo increases. Pretty much all lenses can be stopped down to f16, some to f22 or even f32. But on the latest Pentax DSLRs the high resolution of the sensor means that if you go above f8 or f11, the photo becomes slightly fuzzy (not quite as sharp). At f22 it is quite noticeable. Cameras with a higher resolution (usually this means smaller sensor) this happens at even lower number.
Last edited by Na Horuk; 06-26-2014 at 12:39 PM.