An exercise at the end of a chapter on primitive roots asked me to compute $1^k + 2^k + \ldots + (p-1)^k \pmod{p}$ for any positive integer $k$ and any prime $p$. Clearly, if $k$ is odd, the expression is congruent to $0$ modulo $p$. But how can I even approach this problem if $k$ is even? And how do primitive roots apply? Hints would be greatly appreciated.
1 Answer
apply Fermat's little theorem it says
$a^p \equiv \pmod p$
If $p-1 \mid k$ then by Fermat Little Theorem $a^k \equiv 1 \pmod p$
-
$\begingroup$ I don't see this. The exponents in the sum are $k$, not $p.$ $\endgroup$ Aug 9, 2018 at 23:03
-