I know that any number p-prime, p^k (mod 10) = [p^(k mod 4)] (mod 10) and I also know p^k (mod 100) = [p^(k mod 20)] (mod 100) this means that the number 37^2005 has the same final two digits as 37^5, which is what I used as my answer for the problem. Through some playing around, I found this statement above to satisfy all numbers, but for some numbers the (k mod 4) and (k mod 20) were not the smallest, meanning, the final two digits repeat much more often. take 10, 10^2 mod 100 = 00, and so squaring both sides of the congurency 10^2k congruent to 00 again. i know its also true for p^(2k+1) (its obvious) but I suck at showing why. also, for perfect squares, like 4, since its 2^2, p^k (mod 100) is congruent to p^(k (mod 10)) (mod 100).... I am having trouble finding number theoretic functions to define why this p^k repeats in 4 times for mod 10 and 20 times for mod 100, and id like to know what the value is for mod 1000, so that i could find the lowest power of 37^k that shares three last digits with 37^2005, and that was the extra credit part of the question. i already handed it in, but i NEED to know before spring break is over or i wont be able to get a wink of meaningful sleep!