You asked
Pentax hd da 20 40mm f 2 8 4 ed limited dc wr vs pentax 16 45mm f 4?
I don't have a page on the Pentax 16-45mm f/4, so I can't compare it fairly with the 20-40mm. What I can tell you about the Pentax HD DA 20-40mm f/2.8-4 ED Limited DC WR is that it's the only zoom in Pentax's Limited range, in a small metal barrel. On APS-C it frames like a 30-60mm on full frame. It isn't stabilised, and it gets darker as you zoom in.
If you want a longer everyday zoom for the same Pentax K system, the Pentax HD DA 16-85mm f/3.5-5.6 ED DC WR is worth a look, though I haven't written up its details yet. If your main subjects are scenery, my Landscape guide explains why wide zooms are the classic choice and why f/4 zooms are often enough.
Written by Claude from this site's pages.