I have a question that I have solved the first part for, but the solution to the second part seems elusive.
Let p be an odd prime and let n be a natural number. Define $S_n(p)=$ Sum between $k=1$ and $p-1$ of $k^n$. Show that $S_n(p)$ is congruent to:
$-1$ mod $p,$ if $n$ is congruent to $0$ mod $p-1$
$0$ mod $p,$ if n is not congruent to $0$ mod $p-1$
I have solved part 1 by rewriting the sum $S_n(p)$ in terms of a primitive root $g$ mod $p$. So the sum becomes $g^n + g^2n + ... + g^{p-1}n$. From this, we know that as $n$ is congruent to $0$ mod $p-1,$ the sum is congruent to $1 + 1 + ... + 1, p-1$ times so it is congruent to $p-1$ and hence $-1$ mod $p$.
With part 2, I am fairly confident I need to find something which is non-zero to multiply the sum by so that I can then rearrange the sum so that it's congruent to 0 mod p, but I can't figure out what it could be. Any ideas?
Many thanks in advance for any help!
Hint: $k \mapsto gk$ is a bijection of the classes mod $p$. Conclude that $g^n S_n = S_n$.