TITLE: Write $1/1 + 1/2 + ...1/ (p-1)=a/b$ with $(a,b)=1$. Show that $p^2 \mid a$ if $p\geq 5$ is prime [Wolstenholme's theorem]
QUESTION [9 upvotes]: Write $\frac 11 + \frac12 + ...\frac1{(p-1)} =$ $\frac ab$.Such that $(a,b)=1$. Show that $p^2 \mid a$ $\text{if}$ $p\geq 5$.
I was trying to apply something with prime modulus, but I am unsure how exactly to go about it.

REPLY [4 votes]: Lets call $s:=(p-1)!(1 +\frac{1}{2} +\cdots +\frac{1}{p-1})$
Since, $s$ contains a even number of terms.
For $i =1,2, \dots, \frac{p-1}{2}$ and let's add them as follows:
\begin{equation*}
\frac{1}{i} + \frac{1}{p-i}= \frac{p}{i(p-i)} \quad \text{for} \quad i =1,2, \dots , \frac{(p-1)}{2}
\end{equation*}
\begin{equation*}
s = (p-1)! \sum_{i=1}^{\frac{p-1}{2}}\frac{p}{i(p-i)}
\end{equation*}
Cleary $p$ divides $s$.
Let $t$ be defined by:
\begin{equation*}
t=(p-1)!\left(\displaystyle \sum_{i=1}^{\frac{p-1}{2}}\frac{1}{i(p-i)} \right)
\end{equation*}
To prove that $t\equiv 0 \quad (\text{mod $p$})$.
Passing to $\text{mod $p$}$, and using Wilson's Theorem one obtains:
\begin{equation*}
t \equiv -\displaystyle \sum_{i=1}^{\frac{p-1}{2}}\frac{1}{i(p-i)}=\sum_{i=1}^{\frac{p-1}{2}}\frac{1}{i^2} =\frac{1}{2} \sum_{i=1}^{p-1}i^2=\frac{(p-1)p(2p-1)}{6}
\end{equation*}
which is clearly divisible by 2.