If for a prime p $1+\frac{1}{2}+\frac{1}{3}+\ldots + \frac{1}{p-1}=\frac{a}{b}$ then show that p divides a. Moreover if $p>3$ then $p^2$ divides a. Here is a problem from Hersteins Topics in Algebra:

If $1+\frac{1}{2}+\frac{1}{3}+\ldots + \frac{1}{p-1}=\frac{a}{b}$ for a prime $p$, then show that $p$ divides $a$. Moreover if $p>3$ then $p^2$ divides $a$. 

I am able to prove the first part by writing 
$$1+\frac{1}{2}+\frac{1}{3}+\ldots + \frac{1}{p-1}=\frac{(p-1)!+ \frac{(p-1)!}{2}+\frac{(p-1)!}{3}+\ldots + 1 }{(p-1)!},$$
where we can show the numerator to be congruent to $0$ mod $p$. I can't seem to crack the second part. Thanks in advance for any help. 
 A: Working in $\Bbb{Z}/p\Bbb{Z}$, fractions make sense as long as the numerators are coprime to $p$, so setting $p':=\tfrac{p-1}{2}$ we may write
$$\frac{a}{b}=\sum_{n=1}^{p-1}\frac{1}{n}\equiv\sum_{n=1}^{p'}\left(\frac{1}{n}+\frac{1}{p-n}\right)=\sum_{n=1}^{p'}\frac{p}{n(p-n)}=p\sum_{n=1}^{p'}\frac{1}{n(p-n)}\pmod p,$$
by basic modular arithmetic. Some more of that shows
$$\sum_{n=1}^{p'}\frac{1}{n(p-n)}=\sum_{n=1}^{p'}(n(p-n))^{-1}\equiv\sum_{n=1}^{p'}(n(-n))^{-1}=-\sum_{n=1}^{p'}n^{-2}\pmod p.$$
Taking inverses yields a bijection from $(\Bbb{Z}/p\Bbb{Z})^{\times}$ to itself, mapping squares to squares, meaning that
$$\sum_{n=1}^{p'}n^{-2}\equiv\sum_{n=1}^{p'}n^2\pmod p,$$
which is easily evaluated; we find that
$$\frac{a}{b}\equiv p\sum_{n=1}^{p'}\frac{1}{n(p-n)}\equiv -p\sum_{n=1}^{p'}n^2=-\frac{p^2(p-1)(p-2)}{6}\pmod p,$$
which is clearly congruent to $0$ modulo $p^2$ whenever $p>3$.
A: The numerator is $(p-1)!\left ( \frac 11 + \frac 12 + ... + \frac 1{p-1}\right )  \equiv (p-1)!\left ( 1^{-1} + 2^{-1} + ... + (p-1)^{-1}\right ) \mod {p^2}$.
The Euler function for $p^2$ is $p(p-1)$. Thus, for any $k \lt p  $ ,   $k^{-1} \equiv k^{p(p-1)-1}\mod p^2$.
Thus, $k^{-1} + (p-k)^{-1} \equiv k^{p(p-1)-1} + (p-k)^{p(p-1)-1} \equiv k^{p(p-1)-1} + p^2.c + (-k)^{p(p-1)-1} $ ($\because p \gt 3$). Also, as $p(p-1)-1$ is odd, hence $(-k)^{p(p-1)-1} \equiv (-1).(k)^{p(p-1)-1}$. Thus, $k^{p(p-1)-1} + (p-k)^{p(p-1)-1} \equiv 0 \mod p^2$. Hence numerator is divisible by $p^2$.
