<s>[INST] Proof of Wolstenholme's theorem According to the theorem, if
$$1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\cdots+\frac{1}{p-1} =\frac{r}{q}$$
then we have to prove that $r\equiv0 \pmod{p^2}$.
(Given $p>3$, otherwise $1+\dfrac{1}{2}=\dfrac{3}{2}$, $3 \not\equiv  0 \pmod 9$.)
I guess there's a $(\bmod p)$ solution for this, but I don't really get how to start it. 
 [/INST] $ (1 + \frac 1 {p-1}) + (\frac 1 2 + \frac 1 {p-2}) + \ldots + (\frac 1 {(p-1)/2} + \frac 1 {(p+1)/2}) = \frac p {p-1} + \frac p {2(p-2)} + \ldots + \frac p {((p-1)(p+1)/4)}
\\ = p \sum_{k=1}^{(p-1)/2} \frac 1 {k(p-k)} = \frac p 2 \sum_{k=1}^{p-1} \frac 1 {k(p-k)} $.
Now, working on this second sum in the field $\Bbb Z / p \Bbb Z$, and assuming $p>3$ you get :
$\sum_{k=1}^{p-1} \frac 1 {k(p-k)} = - \sum_{k=1}^{p-1} \frac 1 {k^2} = - \sum_{k=1}^{p-1} k^2 = -(p-1)p(2p-1)/6 = 0$.
If you don't know the sum of the first consecutive squares formula, you can still get it with a bit more work :
Pick a number $a \neq 1$ such that $a$ is a square modulo $p$ (again assuming $p>3$).
Then, $\sum k^2 (1-a) = \sum k^2 - \sum (ak^2) = \sum k^2 - \sum k^2 = 0$. Since $1-a \neq 0$, $\sum k^2 = 0$.  
(when $p = 3$, $1+ \frac 1 2 = \frac 3 2$ which is not a multiple of $3^2$)
</s>