Wednesday, 31 December 2025

Exercise (4.1).10

Prove the following:

(a) $1^{p−1} + 2^{p−1} + 3^{p−1} + \ldots + (p−1)^{p−1} \equiv −1 \pmod p$

where $p$ is prime.

(b) $1^p + 2^p + 3^p + \ldots + (p− 1)^p \equiv 0  \pmod p$

where $p$ is an odd prime.

You may find the following result helpful: $1 + 2 + 3 + \ldots + n = \frac{n(n+1)}{2}$


(a) All the numbers $1, 2, 3, \ldots, (p-1)$ are not divisible by the prime $p$. This means we can apply FlT. 

$$ \begin{align} 1^{p−1} + 2^{p−1} + 3^{p−1} + \ldots + (p−1)^{p−1} & \equiv  1 + 1 + 1 + \ldots + 1 \pmod p \\ \\ & \equiv (p-1) \pmod p \\ \\ & \equiv -1 \pmod p \end{align} $$


(b) Using Corollary 4.2, which says that for any integer $a$ and prime $p$, we have $a^p \equiv a \pmod p$. 

This gives us 

$$ \begin{align} 1^p + 2^p + 3^p + \ldots + (p− 1)^p & \equiv 1 + 2 + 3 + \ldots + (p− 1) \pmod p \\ \\ & \equiv \frac{(p-1)(p)}{2}  \pmod p  \\ \\  & \equiv kp \pmod p \\ \\ & \equiv 0 \pmod p\end{align} $$

where $k = \frac{p-1}{2}$ is an integer since $p$ is odd.