# Thread: Odd Primes with Modulo

1. ## Odd Primes with Modulo

Let p be an odd prime. Given:

(x+1)^p = x^p + 1^p (mod p)

holds for any integer x, prove n^p = n(mod p) for all integers n.

Any help would be greatly appreciated!!

2. Originally Posted by zachsch

Let p be an odd prime. Given:

(x+1)^p = x^p + 1^p (mod p)

holds for any integer x, prove n^p = n(mod p) for all integers n.

Any help would be greatly appreciated!!

Induction on n: for n= 1 is trivial, so suppose it's true for n-1 and then:

$n^p=(n-1+1)^p\buildrel\text{ind. hyp.}\over=(n-1)^p+1^p\!\!\!\pmod p$ ...take it from here

Tonio

3. How would I go about "taking it from here"?

4. Originally Posted by zachsch
How would I go about "taking it from here"?

Well, for that you'll have to think and make a little effort instead of writing back immediately asking for the solution...

Tonio

5. Got it! Thanks a million!!!

6. By the way you said in your hypothesis that p has to be odd, implying that this does not work for p=2. It does in fact work for p=2.

Also, the proof of the hypothesis is far more interesting than the proof of your statement, which is practically a corollary of the hypothesis.