Wolstenholme’s theorem

We want to show first that the harmonic numberMathworldPlanetmath

Hn=: 1+12+13++1n=011-xn1-xdx

is never an integer (n>1).

Denote by p the greatest prime numberMathworldPlanetmath not exceeding n.  By Bertrand’s postulate there is a prime q with  p<q<2p.  Therefore we have  n<2p.  If Hn were an integer, then the sum


had to be divisible by p.  However its addend n!p is not divisible by p but all other addends are, whence the sum cannot be divisible by p.  The contradictory situation means that Hn is not integer when  n>1.

Theorem (Wolstenholme).  If p is a prime number greater than 3, then the numerator of the harmonic number

Hp-1= 1+12+13++1p-1

is always divisible by p2.

Proof.  Consider the polynomialPlanetmathPlanetmath


One has

f(0)=(p-1)!=f(p) (1)


f(x)=xp-1+a1xp-2+a2xp-3++ap-2x+(p-1)! (2)

where a1,a2,,ap-2 are integers.  Because 1, 2,,p-1 form a set of all modulo p incongruent roots of the Fermat’s congruenceMathworldPlanetmathPlanetmath (http://planetmath.org/FermatsTheorem)  xp-11(modp),  one may write the identical congruence

xp-1-1xp-1+a1xp-2+a2xp-3++ap-2x+(p-1)!(modp). (3)

It may be written by Wilson’s theorem  (p-1)!-1(modp)  as

a1xp-2+a2xp-3++ap-2x 0(modp), (4)

being thus true for any integer x.  From (4) one can successively infer that p divides all coefficients ai, i.e. that (4) actually is a formal congruence.

For the derivativeMathworldPlanetmath of the polynomial f(x) one has


and thus

f(0)=-23(p-1)--12(p-2). (5)

The Taylor seriesMathworldPlanetmath (Taylor polynomial) of f(x) coincides with f(x):


By (1), this equation implies

0=f(0)+f′′(0)2p++f(p-1)(0)(p-1)!pp-2 (6)

Since  pap-3=f′′(0)2,  one has  pf′′(0).  It then follows by (6) that  p2f(0).  And since (5) divided by -(p-1)! gives


the assertion has been proved.


  • 1 L. Kuipers: “Der Wolstenholmesche Satz”.  – Elemente der Mathematik 35 (1980).
Title Wolstenholme’s theorem
Canonical name WolstenholmesTheorem
Date of creation 2013-03-22 19:14:06
Last modified on 2013-03-22 19:14:06
Owner pahio (2872)
Last modified by pahio (2872)
Numerical id 10
Author pahio (2872)
Entry type Theorem
Classification msc 11C08
Classification msc 11A07
Related topic HarmonicNumber