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 p<sup>2</sup>, 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 p<sup>4</sup> 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.
A prime p is called a Wolstenholme prime iff the following condition holds:
The only known Wolstenholme primes so far are 16843 and 2124679 ; any other Wolstenholme prime must be greater than 10<sup>11</sup>. This result is consistent with the heuristic argument that the residue modulo p<sup>4</sup> is a pseudo-random multiple of p<sup>3</sup>. This heuristic predicts that the number of Wolstenholme primes between K and N is roughly ln ln N â ln ln K. The Wolstenholme condition has been checked up to 10<sup>11</sup>, and the heuristic says that there should be roughly one Wolstenholme prime between 10<sup>11</sup> and 10<sup>24</sup>. A similar heuristic predicts that there are no "doubly Wolstenholme" primes, for which the congruence would hold modulo p<sup>5</sup>.
There is more than one way to prove Wolstenholme's theorem. Here is a proof that directly establishes Glaisher's version using both combinatorics and algebra.
For the moment let p be any prime, and let a and b be any non-negative integers. Then a set A with ap elements can be divided into a rings of length p, and the rings can be rotated separately. Thus, the a-fold direct sum of the cyclic group of order p acts on the set A, and by extension it acts on the set of subsets of size bp. Every orbit of this group action has p<sup>k</sup> elements, where k is the number of incomplete rings, i.e., if there are k rings that only partly intersect a subset B in the orbit. There are orbits of size 1 and there are no orbits of size p. Thus we first obtain Babbage's theorem
Examining the orbits of size p<sup>2</sup>, we also obtain
Among other consequences, this equation tells us that the case a = 2 and b = 1 implies the general case of the second form of Wolstenholme's theorem.
Switching from combinatorics to algebra, both sides of this congruence are polynomials in a for each fixed value of b. The congruence therefore holds when a is any integer, positive or negative, provided that b is a fixed positive integer. In particular, if a = âÂÂ1 and b = 1, the congruence becomes
This congruence becomes an equation for using the relation
When p is odd, the relation is
When p â 3, we can divide both sides by 3 to complete the argument.
A similar derivation modulo p<sup>4</sup> establishes that
for all positive a and b if and only if it holds when a = 2 and b = 1, i.e., if and only if p is a Wolstenholme prime.
It is conjectured that if
when k = 3, then n is prime. The conjecture can be understood by considering k = 1 and 2 as well as 3. When k = 1, Babbage's theorem implies that it holds for n = p<sup>2</sup> for p an odd prime, while Wolstenholme's theorem implies that it holds for n = p<sup>3</sup> for p > 3, and it holds for n = p<sup>4</sup> if p is a Wolstenholme prime. When k = 2, it holds for n = p<sup>2</sup> if p is a Wolstenholme prime. These three numbers, 4 = 2<sup>2</sup>, 8 = 2<sup>3</sup>, and 27 = 3<sup>3</sup> are not held for () with k = 1, but all other prime square and prime cube are held for () with k = 1. Only 5 other composite values (neither prime square nor prime cube) of n are known to hold for () with k = 1, they are called Wolstenholme pseudoprimes, they are
The first three are not prime powers , the last two are 16843<sup>4</sup> and 2124679<sup>4</sup>, 16843 and 2124679 are Wolstenholme primes . Besides, with an exception of 16843<sup>2</sup> and 2124679<sup>2</sup>, no composites are known to hold for () with k = 2, much less k = 3. Thus the conjecture is considered likely because Wolstenholme's congruence seems over-constrained and artificial for composite numbers. Moreover, if the congruence does hold for any particular n other than a prime or prime power, and any particular k, it does not imply that
The number of Wolstenholme pseudoprimes up to x is , so the sum of reciprocals of those numbers converges. The constant 499712 follows from the existence of only three Wolstenholme pseudoprimes up to 10<sup>12</sup>. The number of Wolstenholme pseudoprimes up to 10<sup>12</sup> should be at least 7 if the sum of its reciprocals diverged, and since this is not satisfied because there are only 3 of them in this range, the counting function of these pseudoprimes is at most for some efficiently computable constant C; we can take C as 499712. The constant in the big O notation is also effectively computable in .
Leudesdorf has proved that for a positive integer n coprime to 6, the following congruence holds:
In 1900, Glaisher showed further that: for prime p > 3,
Where B<sub>n</sub> is the Bernoulli number.