A prime gap is the difference between two successive prime numbers. The n-th prime gap, denoted gn or g(pn) is the difference between the (n + 1)-th and the n-th prime numbers, i.e.
We have g1 = 1, g2 = g3 = 2, and g4 = 4. The sequence (gn) 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, ... (sequence A001223 in the OEIS).
By the definition of gn every prime can be written as
The first, smallest, and only odd prime gap is the gap of size 1 between 2, the only even prime number, and 3, the first odd prime. All other prime gaps are even. There is only one pair of consecutive gaps having length 2: the gaps g2 and g3 between the primes 3, 5, and 7.
the first term is divisible by 2, the second term is divisible by 3, and so on. Thus, this is a sequence of n − 1 consecutive composite integers, and it must belong to a gap between primes having length at least n. It follows that there are gaps between primes that are arbitrarily large, that is, for any integer N, there is an integer m with gm ≥ N.
However, prime gaps of n numbers can occur at numbers much smaller than n!. 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 1307674368000.
The average gap between primes increases as the natural logarithm of the integer, and therefore the ratio of the prime gap to the integers involved decreases (and is asymptotically zero). This is a consequence of the prime number theorem. From a heuristic view, we expect the probability that the ratio of the length of the gap to the natural logarithm is greater than or equal to a fixed positive number k to be e−k; 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 posits that gn = 2 for infinitely many integers n.
Usually the ratio of gn / ln(pn) is called the merit of the gap gn . As of September 2017[update], the largest known prime gap with identified probable prime gap ends has length 6582144, with 216841-digit probable primes found by Martin Raab. This gap has merit M = 13.1829. The largest known prime gap with identified proven primes as gap ends has length 1113106 and merit 25.90, with 18662-digit primes found by P. Cami, M. Jansen and J. K. Andersen.
As of December 2017[update], 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 293703234068022590158723766104419463425709075574811762098588798217895728858676728143227. The prime gap between it and the next prime is 8350.
|39.620154||15900||175||3483347771 × 409#/30 − 7016||2017||Dana Jacobsen|
|38.066960||18306||209||650094367 × 491#/2310 − 8936||2017||Dana Jacobsen|
|38.047893||35308||404||100054841 × 953#/210 − 9670||2020||Seth Troisi|
|37.824126||8382||97||512950801 × 229#/5610 − 4138||2018||Dana Jacobsen|
The Cramér–Shanks–Granville ratio is the ratio of gn / (ln(pn))2. If we discard anomalously high values of the ratio for the primes 2, 3, 7, then the greatest known value of this ratio is 0.9206386 for the prime 1693182318746371. Other record terms can be found at OEIS: A111943.
We say that gn is a maximal gap, if gm < gn for all m < n. As of August 2018[update] the largest known maximal prime gap has length 1550, found by Bertil Nyman. It is the 80th maximal gap, and it occurs after the prime 18361375334787046697. Other record (maximal) gap sizes can be found in OEIS: A005250, with the corresponding primes pn in OEIS: A002386, and the values of n in OEIS: A005669.
Bertrand's postulate, proven in 1852, states that there is always a prime number between k and 2k, so in particular pn+1 < 2pn, which means gn < pn.
The prime number theorem, proven in 1896, says that the average length of the gap between a prime p and the next prime will asymptotically approach ln(p) 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 an upper bound on the length of prime gaps:
For every , there is a number such that for all
One can also deduce that the gaps get arbitrarily smaller in proportion to the primes: the quotient
hence showing that
for sufficiently large n.
- then for any
Here, O refers to the big O notation, ζ denotes the Riemann zeta function and π the prime-counting function. Knowing that any c > 1/6 is admissible, one obtains that θ may be any number greater than 5/8.
An immediate consequence of Ingham's result is that there is always a prime number between n3 and (n + 1)3, 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 (n + 1)2 for n sufficiently large (see Legendre's conjecture). To verify this, a stronger result such as Cramér's conjecture would be needed.
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 show that for any m there exists a bounded interval with an infinite number of translations each of which containing m prime numbers. Using Maynard's ideas, the Polymath project improved the bound to 246; assuming the Elliott–Halberstam conjecture and its generalized form, N has been reduced to 12 and 6, respectively.
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 c > 0 such that the inequality
holds for infinitely many values n, improving the results of Westzynthius and Paul Erdős. He later showed that one can take any constant c < eγ, 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.
Lower bounds for chains of primes have also been determined.
Conjectures about gaps between primes
using the big O notation. (In fact this result needs only the weaker Lindelöf hypothesis, if you can tolerate an infinitesimally smaller exponent.) Later, he conjectured that the gaps are even smaller. Roughly speaking, Cramér's conjecture states that
Firoozbakht's conjecture states that (where is the nth prime) is a strictly decreasing function of n, i.e.,
If this conjecture is true, then the function satisfies  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.
Meanwhile, Oppermann's conjecture is weaker than Cramér's conjecture. The expected gap size with Oppermann's conjecture is on the order of
As a result, under Oppermann's conjecture – there exists (probably ) for which every natural satisfies
This is a slight strengthening of Legendre's conjecture that between successive square numbers there is always a prime.
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 of k, but Zhang Yitang's result proves that it is true for at least one (currently unknown) value of k which is smaller than 70,000,000; as discussed above, this upper bound has been improved to 246.
As an arithmetic function
The gap gn between the nth and (n + 1)st 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.
- "Hidden structure in the randomness of the prime number sequence?", S. Ares & M. Castro, 2005
- Westzynthius, E. (1931), "Über die Verteilung der Zahlen die zu den n ersten Primzahlen teilerfremd sind", Commentationes Physico-Mathematicae Helsingsfors (in German), 5: 1–37, JFM 57.0186.02, Zbl 0003.24601.
- "Thomas R. Nicely's Home Page".
- Andersen, Jens Kruse. "The Top-20 Prime Gaps". Retrieved 2014-06-13.
- A proven prime gap of 1113106
- NEW PRIME GAP OF MAXIMUM KNOWN MERIT
- Dynamic prime gap statistics
- TABLES OF PRIME GAPS
- Prime Gap List Project
- NEW MAXIMAL PRIME GAPS OF 1530 AND 1550
- Hoheisel, G. (1930). "Primzahlprobleme in der Analysis". Sitzunsberichte der Königlich Preussischen Akademie der Wissenschaften zu Berlin. 33: 3–11. JFM 56.0172.02.
- Heilbronn, H. A. (1933). "Über den Primzahlsatz von Herrn Hoheisel". Mathematische Zeitschrift. 36 (1): 394–423. doi:10.1007/BF01188631. S2CID 123216472.
- Tchudakoff, N. G. (1936). "On the difference between two neighboring prime numbers". Mat. Sb. 1: 799–814.
- Ingham, A. E. (1937). "On the difference between consecutive primes". Quarterly Journal of Mathematics. Oxford Series. 8 (1): 255–266. Bibcode:1937QJMat...8..255I. doi:10.1093/qmath/os-8.1.255.
- Cheng, Yuan-You Fu-Rui (2010). "Explicit estimate on primes between consecutive cubes". Rocky Mt. J. Math. 40: 117–153. arXiv:0810.2113. doi:10.1216/rmj-2010-40-1-117. S2CID 15502941. Zbl 1201.11111.
- Huxley, M. N. (1972). "On the Difference between Consecutive Primes". Inventiones Mathematicae. 15 (2): 164–170. Bibcode:1971InMat..15..164H. doi:10.1007/BF01418933. S2CID 121217000.
- Baker, R. C.; Harman, G.; Pintz, J. (2001). "The difference between consecutive primes, II". Proceedings of the London Mathematical Society. 83 (3): 532–562. doi:10.1112/plms/83.3.532.
- Goldston, D. A.; Pintz, J.; Yildirim, C. Y. (2007). "Primes in Tuples II". arXiv:0710.2728 [math.NT].
- Zhang, Yitang (2014). "Bounded gaps between primes". Annals of Mathematics. 179 (3): 1121–1174. doi:10.4007/annals.2014.179.3.7. MR 3171761.
- "Bounded gaps between primes". Polymath. Retrieved 2013-07-21.
- Maynard, James (2015). "Small gaps between primes". Annals of Mathematics. 181 (1): 383–413. arXiv:1311.4600. doi:10.4007/annals.2015.181.1.7. MR 3272929. S2CID 55175056.
- D.H.J. Polymath (2014). "Variants of the Selberg sieve, and bounded intervals containing many primes". Research in the Mathematical Sciences. 1 (12). arXiv:1407.4897. doi:10.1186/s40687-014-0012-7. MR 3373710. S2CID 119699189.
- Pintz, J. (1997). "Very large gaps between consecutive primes". J. Number Theory. 63 (2): 286–301. doi:10.1006/jnth.1997.2081.
- Erdős, Paul; Bollobás, Béla; Thomason, Andrew, eds. (1997). Combinatorics, Geometry and Probability: A Tribute to Paul Erdös. Cambridge University Press. p. 1. ISBN 9780521584722.
- Ford, Kevin; Green, Ben; Konyagin, Sergei; Tao, Terence (2016). "Large gaps between consecutive prime numbers". Ann. of Math. 183 (3): 935–974. arXiv:1408.4505. doi:10.4007/annals.2016.183.3.4. MR 3488740. S2CID 16336889.
- Maynard, James (2016). "Large gaps between primes". Ann. of Math. 183 (3): 915–933. arXiv:1408.5110. doi:10.4007/annals.2016.183.3.3. MR 3488739. S2CID 119247836.
- Ford, Kevin; Green, Ben; Konyagin, Sergei; Maynard, James; Tao, Terence (2018). "Long gaps between primes". J. Amer. Math. Soc. 31 (1): 65–105. arXiv:1412.5029. doi:10.1090/jams/876. MR 3718451. S2CID 14487001.
- "Long gaps between primes / What's new".
- Ford, Kevin; Maynard, James; Tao, Terence (2015-10-13). "Chains of large gaps between primes". arXiv:1511.04468 [math.NT].
- Cramér, Harald (1936). "On the order of magnitude of the difference between consecutive prime numbers" (PDF). Acta Arithmetica. 2: 23–46. doi:10.4064/aa-2-1-23-46. Archived from the original (PDF) on 2018-07-23. Retrieved 2016-06-27.
- A. E. Ingham, On the difference between consecutive primes, Quart. J. Math. (Oxford) 8, pp. 255-266 (1937).
- Sinha, Nilotpal Kanti (2010). "On a new property of primes that leads to a generalization of Cramer's conjecture". arXiv:1010.1399 [math.NT]..
- Granville, Andrew (1995). "Harald Cramér and the distribution of prime numbers" (PDF). Scandinavian Actuarial Journal. 1: 12–28. CiteSeerX 10.1.1.129.6847. doi:10.1080/03461238.1995.10413946..
- Granville, Andrew (1995). "Unexpected irregularities in the distribution of prime numbers" (PDF). Proceedings of the International Congress of Mathematicians. 1: 388–399. doi:10.1007/978-3-0348-9078-6_32. ISBN 978-3-0348-9897-3..
- Pintz, János (September 2007). "Cramér vs. Cramér: On Cramér's probabilistic model for primes". Functiones et Approximatio Commentarii Mathematici. 37 (2): 232–471. doi:10.7169/facm/1229619660.
- Guy (2004) §A8
- Guy, Richard K. (2004). Unsolved problems in number theory (3rd ed.). Springer-Verlag. ISBN 978-0-387-20860-2. Zbl 1058.11001.
- Soundararajan, Kannan (2007). "Small gaps between prime numbers: the work of Goldston-Pintz-Yıldırım". Bull. Am. Math. Soc. New Series. 44 (1): 1–18. arXiv:math/0605696. doi:10.1090/s0273-0979-06-01142-6. S2CID 119611838. Zbl 1193.11086.
- Mihăilescu, Preda (June 2014). "On some conjectures in additive number theory" (PDF). Newsletter of the European Mathematical Society (92): 13–16. doi:10.4171/NEWS. hdl:2117/17085. ISSN 1027-488X.
- 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.
- Weisstein, Eric W. "Prime Difference Function". MathWorld.
- "Prime Difference Function". PlanetMath.
- 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, Gaps Between Primes; an elementary introduction
- Andrew Granville, Primes in Intervals of Bounded Length; overview of the results obtained so far up to and including James Maynard's work of November 2013.