$1^{p−1}+2^{p−1}+…+(p−1)^{p−1}≡−1 \pmod p$

132 Views Asked by At

I need help proving the following Let p be an odd and prime, prove that $1^{p−1}+2^{p−1}+…+(p−1)^{p−1}≡−1 \pmod p$

2

There are 2 best solutions below

2
On

Well by Fermat's little theorem, $a^{p-1} \equiv 1 \pmod{p}$ for all $a$ such that $p \not \mid a$.

Hence:

$$ 1^{p-1}+2^{p-1}+\ldots+(p-1)^{p-1} \equiv 1+1+\ldots+1 = p-1 \equiv -1 \pmod{p}$$

0
On

By Fermat's little theorem, $i^{p-1}\equiv 1 \pmod{p}$ for $p$ not dividing $i$. So, $$\sum_{i=1}^{p-1} i^{p-1}\equiv \sum_{i=1}^{p-1} 1 \equiv -1 \pmod{p}$$