[math-fun] power question
For any prime p and integer r, does there exist n such that n^n == r (mod p)?
Yes. Assume 0 <= r < p. Begin by noticing that r^1 == r (mod p). Increment the exponent 1 by some multiple of p-1, preserving the congruence. Increment the base r by some multiple of p, also preserving the congruence. Find a coincidence of the base and exponent. This is assisted by noting that incrementing the base by p, and the exponent by p-1, increases base-exponent by 1. First, add p-1 to the exponent to give it a head start, giving r^p == r. Then add p-r steps of (p, resp. p-1) to (base, resp. exponent) to make base = exponent. n = p^2 - rp + r works. Reduce n mod p, giving r for the base. Reduce n mod p-1, and noting that n>0 (since p>r), for the exponent: p^2 -> 1, and rp -> r; n = p^2 - rp + r -> 1 - r + r = 1. So n^n == r^1 == r. Rich ---------- Quoting David Wilson <davidwwilson@comcast.net>:
For any prime p and integer r, does there exist n such that n^n == r (mod p)?
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (2)
-
David Wilson -
rcs@xmission.com