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

• Math100
In summary, by using Fermat's theorem and observing that there are p-1 terms that are congruent to 1 mod p, we can prove that if p is an odd prime, then the sum of these terms is congruent to -1 mod p.

#### Math100

Homework Statement
Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv -1\pmod {p} ##.
Relevant Equations
None.
Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
Note that ## p\nmid a ##.
By Fermat's theorem, we have that ## a^{p-1}\equiv 1\pmod {p} ##.
Observe that there are ## p-1 ## terms in ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1} ##.
This means
\begin{align*}
1^{p-1}&\equiv 1\pmod {p}\\
2^{p-1}&\equiv 1\pmod {p}\\
3^{p-1}&\equiv 1\pmod {p}\\
&\vdots \\
(p-1)^{p-1}&\equiv 1\pmod {p}.\\
\end{align*}
Thus ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv (p-1)\equiv -1\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv -1\pmod {p} ##.

• fresh_42
Math100 said:
Homework Statement:: Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv -1\pmod {p} ##.
Relevant Equations:: None.

Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
Note that ## p\nmid a ##.
... for all ##a\in\{1,2,3,\ldots,p-1\}.##
Math100 said:
By Fermat's theorem, we have that ## a^{p-1}\equiv 1\pmod {p} ##.
Observe that there are ## p-1 ## terms in ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1} ##.
This means
\begin{align*}
1^{p-1}&\equiv 1\pmod {p}\\
2^{p-1}&\equiv 1\pmod {p}\\
3^{p-1}&\equiv 1\pmod {p}\\
&\vdots \\
(p-1)^{p-1}&\equiv 1\pmod {p}.\\
\end{align*}
Thus ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv (p-1)\equiv -1\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p-1}+2^{p-1}+3^{p-1}+\dotsb +(p-1)^{p-1}\equiv -1\pmod {p} ##.

• Math100