TOPICS
Search

Wolstenholme Prime


A Wolstenholme prime is a prime p for which the central binomial coefficient satisfies

 (2p; p)=2 (mod p^4),
(1)

or, equivalently, for which

 B_(p-3)=0 (mod p),
(2)

where B_n is the nth Bernoulli number and the congruence is fractional.

Equivalently, a prime p is a Wolstenholme prime when the harmonic number satisfies

 H_(p-1)=0 (mod p^3).
(3)

A prime p>7 is a Wolstenholme prime iff

 (sum_(|_p/6_|+1)^(|_p/4_|)1/(k^3))=0 (mod p),
(4)

where the congruence is again fractional.

The only known Wolstenholme primes are 16843 and 2124679 (OEIS A088164). There are no others up to 10^9 (McIntosh 2004).

Wolstenholme primes also supply composite counterexamples to two conjectured characterizations of primes. Write H_m=N_m/D_m in lowest terms and a(m)=N_m-D_m. For m=1, 2, ..., the values of a(m) begin 0, 1, 5, 13, 77, 29, 223, 481, 4609, 4861, ... (OEIS A064169). For n=3, 4, ..., the values of g(n)=GCD(n,a(n-2)) begin 3, 1, 5, 1, 7, 1, 1, 1, 11, 1, 13, 1, ... (OEIS A309391). If p is a Wolstenholme prime, then

 p^2|N_(p^2-2)-D_(p^2-2).
(5)

Indeed, the terms of H_(p^2-2) whose indices are divisible by p sum to H_(p-1)/p, which is 0 modulo p^2. Among the remaining terms, pairing k with p^2-k shows that their sum through p^2-1 is 0 modulo p^2; removing the final term gives

 H_(p^2-2)=1 (mod p^2).
(6)

It follows that 16843^2=283686649 is a composite number n for which n|a(n-2) and g(n)=n. This disproves the conjecture in OEIS A064169 that, for n>2, n|a(n-2) holds iff n is prime. It also disproves the equivalent conjecture in OEIS A309391 that g(n)=n only when n is prime (Adamczewski 2026). The counterexample was found by an AI-generated proof formally verified in Lean (Epoch AI 2026).


See also

Central Binomial Coefficient, Integer Sequence Primes, Wolstenholme Number, Wolstenholme's Theorem

Explore with Wolfram|Alpha

References

Adamczewski, T. "OEIS Open: How Many Conjectures Can Language Models Turn into Theorems?" 13 Aug 2026. https://arxiv.org/abs/2608.11941.Epoch AI. LeanOpenProblems-results. Accepted Lean submissions for OEIS A064169 and A309391, rev. 61137ec, 2026. https://github.com/epoch-research/LeanOpenProblems-results/blob/61137ec/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_64169_conjecture_0/Submission/Spec.lean and https://github.com/epoch-research/LeanOpenProblems-results/blob/61137ec/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/A309391_conjecture/Submission/Spec.lean.Lombaers, P. "Generalizations of Wolstenholme's Theorem Via the p-Adic Logarithm." Integers 20, Paper No. A42, 15 pp., 2020. https://doi.org/10.5281/zenodo.10790541.McIntosh, R. email to Paul Zimmermann. 9 Mar 2004. https://members.loria.fr/PZimmermann/records/Wieferich.status.Sloane, N. J. A. Sequences A064169, A088164, and A309391 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Wolstenholme Prime

Cite this as:

Weisstein, Eric W. "Wolstenholme Prime." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/WolstenholmePrime.html

Subject classifications