I’m looking at the sum of m-th powers of consecutive integers
i.e. $Sm(p) = 1^m + 2^m +…+(p-1)^m$
I need to prove: Let $p$ be an odd prime. Prove the following congruences:
$$\begin{align} Sm(p^2) &\equiv 0\pmod{p^2}\text{ if $(p − 1)$ does not divide m}\\ Sm(p^2) &\equiv -p\pmod{p^2}\text{ if $(p − 1)$ divides m} \end{align}$$
For all $m > 1$
I recognize that in order to solve using primitive roots I will need to eliminate the multiples of p in the expansion.
Could someone please show me how to prove it?