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.
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$.