Skip to main content
Commonmark migration
Source Link

This goes way back to Emma Lehmer, see her [elementary paper][1]elementary paper 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} \pmod {p^3}$$ (valid when $2r \not\equiv 2 \pmod {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} \pmod {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}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \pmod {p^3}$$

So your congruence becomes $$(*)\qquad \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \pmod {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} \pmod {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 \not\equiv 2 \pmod {p-1}$, we have $$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \pmod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \not\equiv -1 \pmod {\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}} \pmod {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} \pmod {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}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \pmod {p^3}$$ [1]: http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Emma_Lehmer_1938.pdf

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} \pmod {p^3}$$ (valid when $2r \not\equiv 2 \pmod {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} \pmod {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}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \pmod {p^3}$$

So your congruence becomes $$(*)\qquad \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \pmod {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} \pmod {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 \not\equiv 2 \pmod {p-1}$, we have $$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \pmod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \not\equiv -1 \pmod {\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}} \pmod {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} \pmod {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}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \pmod {p^3}$$ [1]: http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Emma_Lehmer_1938.pdf

This goes way back to Emma Lehmer, see her elementary paper 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} \pmod {p^3}$$ (valid when $2r \not\equiv 2 \pmod {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} \pmod {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}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \pmod {p^3}$$

So your congruence becomes $$(*)\qquad \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \pmod {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} \pmod {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 \not\equiv 2 \pmod {p-1}$, we have $$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \pmod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \not\equiv -1 \pmod {\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}} \pmod {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} \pmod {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}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \pmod {p^3}$$

consistent mod notation
Source Link
Max Alekseyev
  • 34.4k
  • 5
  • 74
  • 152

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}$$$$\sum_{k=1}^{\frac{p-1}{2}} (p-2k)^{2r} \equiv p 2^{2r-1} B_{2r} \pmod {p^3}$$ (valid when $2r \neq 2 \mod {p-1}$$2r \not\equiv 2 \pmod {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}$$$$\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} \pmod {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}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \mod {p^3}$$$$\sum_{r=1}^{\frac{p-1}{2}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \pmod {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}$$$$(*)\qquad \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \pmod {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}$$$$\sum_{k=1}^{p-1} k^{2r} \equiv pB_{2r} \pmod {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}$$2r \not\equiv 2 \pmod {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}$$$$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \pmod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \neq -1 \mod \frac{p-1}{2}$$c \not\equiv -1 \pmod {\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}$$$$\sum_{k=1}^{p-1} \frac{(-1)^k}{k^{2c}} \equiv (1-2^{-2c}) \sum_{k=1}^{p-1} \frac{1}{k^{2c}} \pmod {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}$$$$\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} \pmod {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}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \mod {p^3}$$$$\sum_{k=1}^{p-1} \frac{1}{k^2} = \frac{1}{p^3-p^2-1} \binom{p^3-p^2-1}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \pmod {p^3}$$ [1]: http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Emma_Lehmer_1938.pdf

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}} \left(\frac{1}{p-2k}\right)^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}{p^3-p^2-2} 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

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} \pmod {p^3}$$ (valid when $2r \not\equiv 2 \pmod {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} \pmod {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}} \left(\frac{1}{p-2k}\right)^2 \equiv p 2^{-3} B_{p^3-p^2-2} \pmod {p^3}$$

So your congruence becomes $$(*)\qquad \sum_{k=1}^{p-1} \frac{1}{k^2} \equiv pB_{p^3-p^2-2} \pmod {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} \pmod {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 \not\equiv 2 \pmod {p-1}$, we have $$\sum_{k=1}^{p-1} (-1)^k k^{2r} \equiv (1-2^{2r}) \sum_{k=1}^{p-1} k^{2r} \pmod {p^3}$$

Plugging $2r=p^3-p^2-2c$ ($c \not\equiv -1 \pmod {\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}} \pmod {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} \pmod {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}{p^3-p^2-2} B_{p^3-p^2-2} p = pB_{p^3-p^2-2} \pmod {p^3}$$ [1]: http://gradelle.educanet2.ch/christian.aebi/.ws_gen/14/Emma_Lehmer_1938.pdf

added 11 characters in body
Source Link
Alexey Ustinov
  • 12.3k
  • 7
  • 87
  • 119

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}$$$$\sum_{r=1}^{\frac{p-1}{2}} \left(\frac{1}{p-2k}\right)^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}{p^3-p^2-2} 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

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}{p^3-p^2-2} 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

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}} \left(\frac{1}{p-2k}\right)^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}{p^3-p^2-2} 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

added 8 characters in body
Source Link
Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79
Loading
added 175 characters in body
Source Link
Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79
Loading
added 175 characters in body
Source Link
Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79
Loading
Source Link
Ofir Gorodetsky
  • 14.7k
  • 1
  • 66
  • 79
Loading