Wolstenholme's theorem

In mathematics, Wolstenholme's theorem states that for a prime number p ≥ 5, 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 p ≥ 3. An equivalent formulation is the congruence

for p ≥ 5, which is due to Wilhelm Ljunggren (and, in the special case b = 1, to J. W. L. Glaisher) and is inspired by Lucas's 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.