Problem: For $k < p-1$ where $p$ is an odd prime and $k$ is a natural number, prove that $$1^k+2^k+\cdots+(p-1)^k \equiv 0 \mod p.$$
My attempt: It's obvious for odd $k$, as we can pair the terms 1 with $p-q$ and so on. But I can't come up with a proof for even $k$. It seems like pairing idea used for odd for odd will not work as for a given summand its negative residue may not be present not be be present. For example for primes of the form $4k+3$, $-1$ will not be present but 1 is present.
So, it looks like we will need some kind of expansions.
I found this problem as an unproved lemma, in the proof of an IMO shortlist problem.
I only know elementary number theory.
Please help me.