# $1+\frac{1}{2} +\frac{1}{3} +…+\frac{1}{p-1} =\frac{a}{b}$

Let $p\gt 3$, be a prime number and $1+\frac{1}{2} +\frac{1}{3} +...+\frac{1}{p-1} =\frac{a}{b}$ when $a,b\in \mathbb N$ and $gcd(a,b)=1$.

prove that $p^2|a$.

I proved that $p|a$, but I cant prove $p^2|a$, and my idea is as follow:

By multiplying $(p-1)!$, we get:

$(p-1)!+\frac{(p-1)!}{2}+...+\frac{(p-1)!}{p-2}+\frac{(p-1)!}{p-1}=\frac{a(p-1)!}{b}$ $\,\,\,\,$ $(1)$

So, the number $\frac{a(p-1)!}{b}$ should be integer. consider the left hand of the sum of $(1)$ in the ring $Z_p$. Since in $Z_p$ the inverses are unique and what we have is indeed a rearrangement of all the congruence classes $mod\,p$. So:

$(p-1)!+\frac{(p-1)!}{2}+...+\frac{(p-1)!}{p-2}+\frac{(p-1)!}{p-1}\equiv 1+2+...+p-1\equiv \frac{p(p-1)}{2}\equiv 0$$\,\,\pmod p. And from here, p|\frac{a(p-1)!}{b}, and that's mean: p|a. I tried to prove the statement by considering the ring Z_{p^2} but I get nothing. Thanks in advance… ## 2 Answers Define two polynomials$$f(x)=x^{p-1}-1$$and$$g(x)=(x-1)(x-2)\dotsm(x-(p-1))$$and observe that h(x)=f(x)-g(x) is a polynomial of degree at most p-2 which all of it's coefficients is divisible by p (h has p-1 roots \{1,2,\dotsc,p-1\} in \mathbb Z_p[x], which means that h(x)=0 in \mathbb Z_p[x]). Write g as$$g(x)=x^{p-1}-s_1x^{p-2}+\dotsb-s_{p-2}p+(p-1)!$$then$$g(p)=(p-1)!=p^{p-1}-s_1p^{p-2}+\dotsb+(p-1)!$$Now with observing that all the numbers s_i for i=1,2,\dotsc,p-2 are divisible by p, because are also coefficients of h, we have$$0=p^{p-1}-s_1p^{p-2}+\dotsb-s_{p-2}p\equiv -s_{p-2}p\pmod {p^3}$$Which means that$s_{p-2}\equiv 0\pmod {p^2}$as you want. Note.$\mathbb Z_p[x]$denotes the ring of all polynomials with coefficients in the field$\mathbb Z_p\$.

This is a consequence/version of Wolstenholme's theorem. A proof is available here.

• It would probably be best to expand this answer somewhat. – user642796 Apr 28 '15 at 16:16