Prove that ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.

  • Thread starter Thread starter Math100
  • Start date Start date
Math100
Messages
813
Reaction score
229
Homework Statement
Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations
None.
Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
 
Physics news on Phys.org
Math100 said:
Homework Statement:: Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations:: None.

Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
I think the following detour isn't necessary. As a sum of integers, ##\frac{p(p-1)}{2} ## is automatically an integer, and ##p## obviously a factor. Hence ##\frac{p(p-1)}{2} \equiv 0\pmod{p}.##
Math100 said:
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
 
  • Like
Likes malawi_glenn and Math100
fresh_42 said:
I think the following detour isn't necessary. As a sum of integers, ##\frac{p(p-1)}{2} ## is automatically an integer, and ##p## obviously a factor. Hence ##\frac{p(p-1)}{2} \equiv 0\pmod{p}.##
I guess I wrote too much then.
 
Math100 said:
Homework Statement: Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations: None.

Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
what about if p=2? because i have homework and in the question, they said for any prime p
 
mathstudent1 said:
what about if p=2? because i have homework and in the question, they said for any prime p
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)## won't work if ##p=2##. Can you see why? What is the exact wording of the question?

(BTW, the original thread is over 1 year old.)
 
Steve4Physics said:
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)## won't work if ##p=2##. Can you see why? What is the exact wording of the question?

(BTW, the original thread is over 1 year old.)
because 1 is not congruent to 0 mod 2. so, this prove holds only for odd primes? the reason that I ask is because my teacher wrote for any prime proof that
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)##
 
mathstudent1 said:
because 1 is not congruent to 0 mod 2.
Yes.

mathstudent1 said:
so, this prove holds only for odd primes?
Yes. (Of course we note that all primes are odd except for 2.)

(However, beware of terminology. The term 'even primes' is sometimes, very confusingly IMO, used to mean the sequence 2, 4, 6, 10, 14, 22, 26, 34, 38 .... E.g. see here.)

mathstudent1 said:
the reason that I ask is because my teacher wrote for any prime proof
Then I'd say it's a mistake/oversight.
 
Back
Top