Skip to main content
3 of 7
added 175 characters in body
Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79

This goes way back to Emma Lehmer, see her [elementary paper][1] on Fermat quotients and Bernoulli numbers from 1938.

Assume $p\ge 7$. First, I reformulate your congruence. I replace $$4\sum_{k=1}^{p-1}\frac{(-1)^k}{k^2}\equiv 3\sum_{k=1}^{p-1}\frac{1}{k^2}\pmod{p^3}$$ with the equivalent $$\sum_{k=1}^{p-1} \frac{1}{k^2} \equiv 8\sum_{k=1}^{\frac{p-1}{2}}\frac{1}{(p-2k)^2}\pmod{p^3}$$

Lehmer has proved the following, see equation (19) in the linked paper: $$\sum_{k=1}^{\frac{p-1}{2}} (p-2k)^{2r} \equiv p 2^{2r-1} B_{2r} \mod {p^3}$$ (valid when $2r \neq 2 \mod {p-1}$). Plugging $2r=p^3-p^2-2$, we get

$$\sum_{k=1}^{\frac{p-1}{2}} (p-2k)^{p^3-p^2-2} \equiv p 2^{p^3-p^2-3} B_{p^3-p^2-2} \mod {p^3}$$ Now use Euler's theorem to replace $x^{p^3-p^2-2}$ with $x^{-2}$:

$$\sum_{r=1}^{\frac{p-1}{2}} (\frac{1}{p-2k})^2 \equiv p 2^{-3} B_{p^3-p^2-2} \mod {p^3}$$

So your congruence becomes $$(*) \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \mod {p^3}$$

This was also proved in Lehmer's paper - in equation (15) she writes $$\sum_{k=1}^{p-1} k^{2r} \equiv pB_{2r} \mod {p^3}$$ (valid when $2r \neq 2 \mod {p-1}$). Plugging $2r=p^3-p^2-2$ and using Euler's theorem, we get the desired result.


It is now easy to generalize - when $2r \neq 2 \mod {p-1}$, we have $$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \mod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \neq -1 \mod \frac{p-1}{2}$) we get $$\sum_{k=1}^{p-1} \frac{(-1)^k}{k^{2c}} \equiv (1-2^{-2c}) \sum_{k=1}^{p-1} \frac{1}{k^{2c}} \mod {p^3}$$


To get a taste of things, I include a proof of $(*)$. Via Faulhaber's formula for sum of powers, we get: $$\sum_{k=1}^{p-1} \frac{1}{k^2} \equiv \sum_{k=1}^{p-1} k^{p^3-p^2-2} \equiv \sum_{k=1}^{p} k^{p^3-p^2-2} = $$ $$\frac{1}{p^3-p^2-1} \sum_{j=0}^{p^3-p^2-2}\binom{p^3-p^2-1}{j}B_j p^{p^3-p^2-1-j} \mod {p^3}$$ Note that odd-indexed Bernoulli's vanish, and that by the Von Staudt–Clausen theorem, the even-indexed Bernoulli's have $p$ in the denominator with multiplicity $\le 1$. Additionally, $B_{p^3-p^2-4}$ is $p$-integral (since $p-1 \nmid p^3-p^2-4$).

Hence, for the purpose of evaluating the sum modulo $p^3$, we can drop almost all the terms and remain only with the last one: $$\sum_{k=1}^{p-1} \frac{1}{k^2} = \frac{1}{p^3-p^2-1} \binom{p^3-p^2-1}{1} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \mod {p^3}$$ [1]: http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Emma_Lehmer_1938.pdf

Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79