# Prove that $a\equiv 0$ $(mod$ $p)$ given $\sum^{p-1}_{k=1} \frac{1}{k^2} = \frac{a}{b}$ where $p$ is prime and $gcd(a,b)=1$

That is prove that the numerator of $\sum^{p-1}_{k=1} \frac{1}{k^2}$ expressed in lowest terms is divisible by $p$ where $p$ is prime.

I have tried to express the numerator but am not having much luck reducing it and I cannot find much online that is helpful here. Any hints/help is greatly appreciated, thanks in advance.

• GCD $(a,b)=0?$ – lab bhattacharjee Oct 17 '17 at 4:14
• @Labbhattacharjee fixed, thanks – Rick Owens Oct 17 '17 at 4:17

$$\sum_{k=1}^{p-1}\dfrac1{k^2}\equiv\sum_{r=1}^{p-1}r^2\pmod p$$
as $(k,p)=1$ for $1\le k<p,$ there exists a unique $r,1\le r<p$ such that $kr\equiv1\pmod p$