The sum $\sum_{k=1}^{p-1} \frac{(p-1)!}{k} \pmod{p^2}$.

57 Views Asked by At

I've been trying to prove that if $p \ge 5$ is a prime, then

$\sum_{k=1}^{p-1} \frac{(p-1)!}{k} \equiv 0 \pmod{p^2}$.

Unfortunately, I have no good ideas on how to start a proof. I worked out the sum for p=5 and p=7 to see if a pattern is noticeable, but I couldn't spot any useful patterns or properties. Just based on the $(p-1)!$ term I thought Wilson's theorem may be useful, but I was unable to see if this is truly the case. Can anyone please give me a hand with this proof? Thanks.