Let $p$ be a prime number. Find the integers $k \geqslant 0$ for which $p$ divides $1^{k}+2^{k}+\cdots+p^{k}$.
When $k=0$, our sum is equal to $p$. The integer $k=0$ is therefore a solution, and we now focus on the cases where $k \geqslant 1$.

Let $x$ be an element of $\mathbb{Z} / p \mathbb{Z}$ of order $p-1$. The first $p-1$ powers of $x$ coincide with the invertibles modulo $p$, so that

$$
1^{k}+2^{k}+\cdots+(p-1)^{k}+p^{k} \equiv 1^{k}+2^{k}+\cdots+(p-1)^{k} \equiv x^{0 k}+x^{k}+x^{2 k}+\cdots+x^{(p-2) k}
$$

This is the sum of a geometric sequence with common ratio $x^{k}$. If $x^{k} \equiv 1(\bmod p)$, that is, if $p-1$ divides $k$, this sum is $p-1$. Otherwise, it is

$$
\frac{x^{(p-1) k}-1}{x-1} \equiv 0 \quad(\bmod p)
$$

In conclusion, the integers $k$ we are looking for are $k=0$ and the non-zero integers that are not divisible by $p-1$.