While both K-5 and D5100 (and D7000 for that matter) uses the same sensor from SONY, I think it's a bit like comparing apples to oranges. It would be more relevant to compare K-5 to D7000 or D5100 to K-r or even K-30. Pentax K-5 has a definitive edge if rugged build and weather sealing is a strong need, while D7000 also has excellent build quality and decent weather sealing, perhpas not as stout as K-5. I think image quality between K-5, D5100/D7000 are essentially comparable since all three uses the same SONY sensor.
While I find K-5 very appealing if you are not going to purchase extensive additional lenses, the reason Nikon gets the nod is because you get more extensive choice of lenses (although some may argue Pentax has even more choices among legacy lenses). And if you wanted to use off-camera, multiple flash set up, then Pentax has nothing similar to Nikon CLS. If maximum bang for the buck is your primary consideration, D5100 for under $500 is unbeatable among DSLRs.


