In mathematics, Wolstenholme's theorem states that for a prime number , the congruence
holds, where the parentheses denote a binomial coefficient. For example, with p = 7, this says that 1716 is one more than a multiple of 343. The theorem was first proved by Joseph Wolstenholme in 1862. In 1819, Charles Babbage showed the same congruence modulo p2, which holds for . An equivalent formulation is the congruence
for , which is due to Wilhelm Ljunggren[1] (and, in the special case , to J. W. L. Glaisher[citation needed]) and is inspired by Lucas' theorem.
No known composite numbers satisfy Wolstenholme's theorem and it is conjectured that there are none (see below). A prime that satisfies the congruence modulo p4 is called a Wolstenholme prime (see below).
As Wolstenholme himself established, his theorem can also be expressed as a pair of congruences for (generalized) harmonic numbers:
since
(Congruences with fractions make sense, provided that the denominators are coprime to the modulus.) For example, with p=7, the first of these says that the numerator of 49/20 is a multiple of 49, while the second says the numerator of 5369/3600 is a multiple of 7.