Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This was inspired by this question. I tried to use the identity

$${2n \choose n}=\sum_{k=0}^n {n \choose k}^2$$

(see this question) to prove that $$\binom{2p}p\equiv2\pmod{p^3}$$ if $p\gt3$ is prime. (Wikipedia gives a combinatorial proof that this special case of Wolstenholme's theorem implies the general case.) Since $\binom p0=\binom pp=1$, we want

$$\sum_{k=1}^{p-1}\binom pk^2\equiv0\pmod{p^3}\;.$$

The binomial coefficients are all divisible by $p$, so we can write this as

$$\sum_{k=1}^{p-1}\left(\frac1p\binom pk\right)^2\equiv0\pmod{p}\;.$$


$$\frac1p\binom pk=\frac{(p-1)\cdots(p-(k-1))}{k(k-1)\cdots1}\equiv\frac1k\frac{(-1)\cdots(-(k-1))}{(k-1)\cdots1}\equiv\pm\frac1k\pmod p\;,$$

and thus

$$\sum_{k=1}^{p-1}\left(\frac1p\binom pk\right)^2\equiv\sum_{k=1}^{p-1}\left(\pm\frac1k\right)^2\equiv\sum_{k=1}^{p-1}\left(\frac1k\right)^2\pmod{p}\;.$$

As $k$ traverses the non-zero residues $\bmod p$, so does $1/k$, so this is just twice the sum of the quadratic residues $\bmod p$, which is zero for $p\gt3$ as required.

I couldn't find this proof of Wolstenholme's theorem anywhere, so I'm wondering:

  • Is there a mistake in it?
  • If not, is it known?
  • If not, is it relevant?


In the meantime I came across this paper, which does make extensive use of the sum-of-squares identity in the context of Wolstenholme's theorem, though not for proving the theorem itself.

Regarding the use of the sum over reciprocals in proving the harmonic-number version of the theorem, as in the paper linked to in Don's answer: I was aware of that use, but the main reason I thought that this alternative proof might nevertheless be of interest is that to prove the congruence for the binomial coefficient from the two congruences for the (generalized) harmonic numbers requires two sums, whereas I'm only evaluating a single sum.

share|cite|improve this question
I haven't seen that proof before, but I'm not a number-theorist. You could also be more explicit and write the last sum as $\sum_{k=1}^{p-1} k^{2}$ (mod $p$), and $\sum_{k=1}^{p-1}k^{2} = \frac{(p-1)p(2p-1)}{6}$, and for $p >3,$ this is divisible by $p.$ – Geoff Robinson Jul 16 '12 at 10:52
I discovered this proof at some point. I think it is likely to be known. I think I did not find this proof online then too. What is/are the standard proof(s)? Also, is there a way to prove this using a counting argument? – user2372086 Jul 23 '13 at 5:44

I think your proof is fine, but you can take a peek at this paper where it is proved that the numerator of $$H(p-1):=1+\frac{1}{2}+...+\frac{1}{p-1}=\sum_{k=1}^{p-1}\frac{1}{k}$$ is divisible by $\,p^2\,\,,\,p>3$ a prime.

Claims 1-2 in this paper are pretty nice (claim 3 is Geoff's remark), and the proof flows smoothly, imo.

share|cite|improve this answer
Thanks, I hadn't found that paper. But note that to prove the congruence for the binomial coefficient from the two congruences for the (generalized) harmonic numbers requires two sums, whereas "my" proof only involves a single sum. – joriki Jul 16 '12 at 12:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.