Wikipedia / Prime gap
Wikipedia / Prime gap
A prime gap is the difference between two successive prime numbers-th prime numbers, i.e.,
. The sequence of prime gaps has been extensively studied; however, many questions and conjectures remain unanswered.
The first 60 prime gaps are:
1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 6, 4, 6, 6, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 10, 6, 6, 6, 2, 6, 4, 2, ... .
every prime can be written as
Simple observations
The first, smallest, and only odd prime gap is the gap of size 1 between 2, the only even between the primes 3, 5, and 7.
For any integer, the factorial. Then in the sequence
the first term is divisible by 2, the second term is divisible by 3, and so on. Thus, this is a sequence of consecutive composite.
. For instance, the first prime gap of size larger than 14 occurs between the primes 523 and 541, while 15! is the vastly larger number 1 307 674 368 000.
The average gap between primes increases as the natural logarithm of these primes, and therefore the ratio of the prime gap to the primes involved decreases (and is asymptotically zero). This is a consequence of the prime number theorem; consequently the ratio can be arbitrarily large. Indeed, the ratio of the gap to the number of digits of the integers involved does increase without bound. This is a consequence of a result by Westzynthius.
In the opposite direction, the twin prime conjecture.
Numerical results
is called the merit.
The largest known prime gap with identified probable prime gap ends has length , with -digit probable primes and merit , found by Andreas Höglund in . The largest known prime gap with identified proven primes as gap ends has length and merit 25.90, with -digit primes found by P. Cami, M. Jansen and J. K. Andersen.
, the largest known merit value and first with merit over 40, as discovered by the Gapcoin network, is 41.93878373 with the 87-digit prime . The prime gap between it and the next prime is 8350.. If we discard anomalously high values of the ratio for the primes 2, 3, and 7, then the greatest known value of this ratio is 0.9206386 for the prime 1693182318746371. For comparison, the gap discovered by the Gapcoin network (with merit 41.9) has a Cramér–Shanks–Granville ratio of just 0.2058791. Other record terms can be found at .
is a maximal gap. , the largest known maximal prime gap has length 1854, found by Robert Smith, using code by Brian Kehrig. It is the 85th maximal prime gap, and it occurs after the prime 101412319996363309069. Other record (maximal) gap sizes can be found in in in terms.
|+ The 85 known maximal prime gaps |-style="vertical-align: top;" |
Further results
Upper bounds
Bertrand's postulate, proven (for all k.
The prime number theorem, for sufficiently large primes. The actual length of the gap might be much more or less than this. However, one can deduce from the prime number theorem that the gaps get arbitrarily smaller in proportion to the primes: the quotient
In other words (by definition of a limit,
Hoheisel (1930) was the first to show such that
hence showing that for sufficiently large,
. This was improved to 249/250 by Heilbronn,, by Chudakov.
A major improvement is due to Ingham, who showed that for some positive constant c,
Here, O refers to the big O notation, ζ denotes the Riemann zeta function and π the prime-counting function. Knowing that any is admissible, one obtains that θ may be any number greater than 5/8.
Since 5/8+ε, it follows that there is always a prime number between n3 and , if n is sufficiently large..
The Lindelöf hypothesis would imply that Ingham's formula holds for c any positive number: but even this would not be enough to imply that there is a prime number between n2 and for n sufficiently large (see Legendre's conjecture). To verify this, a stronger result such as Cramér's conjecture would be needed.
Huxley in 1972 showed that one may choose .
A result, due to Baker, Harman and Pintz in 2001, shows that θ may be taken to be 0.525.
The above describes limits on all gaps; another area of interest is the minimum gap size. The twin prime conjecture asserts that there are always more gaps of size 2, but remains unproven. In 2005, Daniel Goldston, János Pintz and Cem Yıldırım proved that
and 2 years later improved this to
In 2013, Yitang Zhang proved that
meaning that there are infinitely many gaps that do not exceed 70 million. A Polymath Project collaborative effort to optimize Zhang's bound managed to lower the bound to 4680 on July 20, 2013. In November 2013, James Maynard introduced a new refinement of the GPY sieve, allowing him to reduce the bound to 600 and also show that the gaps between primes m apart are bounded for all m. That is, for any m there exists a bound Δm such that for infinitely many n. Using Maynard's ideas, the Polymath project improved the bound to 246; assuming the Elliott–Halberstam conjecture and its generalized form, the bound has been reduced to 12 and 6, respectively. The current best-known bound is 240.
Lower bounds
In 1931, Erik Westzynthius proved that maximal prime gaps grow more than logarithmically. That is,
In 1938, Robert Rankin proved the existence of a constant such that the inequality
holds for infinitely many values of n, improving the results of Westzynthius and Paul Erdős. He later showed that one can take any constant , where γ is the Euler–Mascheroni constant. The value of the constant c was improved in 1997 to any value less than 2eγ.
Paul Erdős offered a $10,000 prize for a proof or disproof that the constant c in the above inequality may be taken arbitrarily large. This was proved to be correct in 2014 by Ford–Green–Konyagin–Tao and, independently, James Maynard.
The result was further improved to
for infinitely many values of n by Ford–Green–Konyagin–Maynard–Tao.
In the spirit of Erdős' original prize, Terence Tao offered US$10,000 for a proof that c may be taken arbitrarily large in this inequality.
In 2026, a proof and formalization in Lean claiming authorship by AI model GPT-5.6 Sol was uploaded to Github, positing an improvement on the bound to:
The claimed proof has not yet been fully verified.
Lower bounds for chains of primes have also been determined.
Conjectures about gaps between primes
As described above, the best proven bound on gap sizes is (for n sufficiently large; we do not worry about or ), but it is observed that even maximal gaps are significantly smaller than that, leading to a plethora of unproven conjectures.
The first group hypothesize that the exponent can be reduced to .
Both Legendre's conjecture that there always exists a prime between consecutive perfect squares and Andrica's conjecture that the difference of square roots of consecutive primes is bounded by 1 imply that
Oppermann's conjecture makes the stronger claim that, for sufficiently large n (probably ),
All of these remain unproved. Harald Cramér came close, proving that the Riemann hypothesis implies the gap gn satisfies
using the big O notation. (In fact this result needs only the weaker Lindelöf hypothesis, if one can tolerate an exponent infinitesimally larger than 1/2.)
Dudek also proved an explicit version of Cramer's result (also assuming Riemann hypothesis) that is, for all n ≥ 2,
As noted by Dudek, for sufficiently large n to be any constant greater than 1.
In the same article, Cramér conjectured that the gaps are far smaller. Roughly speaking, Cramér's conjecture states that
a polylogarithmic growth rate slower than any exponent .
Cramér's model, under which he made the conjecture, was oversimplified (assuming some events are statistically independent when they are dependent) and thus not very accurate (see Cramér's conjecture), but after further investigations, new heuristics were found which became strong evidence that the conjecture is true.
As this matches the observed growth rate of prime gaps, there are a number of similar conjectures. Firoozbakht's conjecture is slightly stronger, stating that pn1/n is a strictly decreasing function of n, i.e., for all n ≥ 1,
If this conjecture is true, then . It implies a strong form of Cramér's conjecture but is inconsistent with the heuristics of Granville and Pintz, which suggest that infinitely often for any , where γ denotes the Euler–Mascheroni constant.
Polignac's conjecture states that every positive even number k occurs as a prime gap infinitely often. The case k=2 is the twin prime conjecture. The conjecture has not yet been proven or disproven for any specific value ofk, but the improvements on Zhang's result discussed above prove that it is true for at least one (currently unknown) value of k≤246.
In her 2026 paper, Julia Stadlmann of the University of Illinois at Urbana-Champaign improved the bound to 240, using the Bombieri–Vinogradov theorem with newer equidistribution estimates for smooth moduli, with Thomas Bloom noting the result can be improved a little further with more effort.
GPT 5.6 also found a proof to improve the bound to 240 . This was earlier than Julia Stadlmann's paper.
As an arithmetic function
The gap gn between the nth and (n+1)th prime numbers is an example of an arithmetic function. In this context it is usually denoted dn and called the prime difference function. The function is neither multiplicative nor additive.
See also
References
Further reading
External links
Thomas R. Nicely, Some Results of Computational Research in Prime Numbers – Computational Number Theory. This reference web site includes a list of all first known occurrence prime gaps.
Armin Shams, Re-extending Chebyshev's theorem about Bertrand's conjecture, does not involve an 'arbitrarily big' constant as some other reported results.
Chris Caldwell, ; an elementary introduction
Andrew Granville, ; overview of the results obtained so far up to and including James Maynard's work of November 2013.
Birke Heeren, https://zenodo.org/records/17148139 Here you find a paper on how to calculate large gaps.