0
$\begingroup$

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.

$\endgroup$
0

1 Answer 1

0
$\begingroup$

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$

$\endgroup$
2
  • $\begingroup$ I don't see this. The exponents in the sum are $k$, not $p.$ $\endgroup$
    – saulspatz
    Commented Aug 9, 2018 at 23:03
  • $\begingroup$ sorry I made a mistake $\endgroup$ Commented Aug 9, 2018 at 23:03

Not the answer you're looking for? Browse other questions tagged .