I got a pentex 645n with a few lens's and I was looking at dslr's and was wondering if this lens (smc pentax-fa 645 1:2.8 150mm) would work on say a pentex k100d or a k10d
Yes - with an adapter. You will lose autofocus and metering will not be as convenient as using the lenses designed for the smaller format, but it will work.