A001223 Prime gaps: differences between consecutive primes.
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, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4, 2, 4, 12, 8, 4, 8, 4, 6, 12
Offset: 1
References
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
- GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
- Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Vojtech Strnad, First 100000 terms [First 10000 terms from N. J. A. Sloane]
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- Anonymous ["TheHereticAnthem20"], Prime gaps mapped to sounds, Youtube video (2018).
- B. Apostol, L. Panaitopol, L Petrescu, and L. Toth, Some Properties of a Sequence Defined with the Aid of Prime Numbers, J. Int. Seq. 18 (2015) # 15.5.5.
- S. Ares and M. Castro, Hidden structure in the randomness of the prime number sequence?, arXiv:cond-mat/0310148 [cond-mat.stat-mech], 2003-2005.
- József Beck, Inevitable randomness in discrete mathematics, University Lecture Series, 49. American Mathematical Society, Providence, RI, 2009. xii+250 pp. ISBN: 978-0-8218-4756-5; MR2543141 (2010m:60026). See page 7.
- Chris K. Caldwell, Prime k-tuple conjecture, Prime Pages' Glossary entry.
- Joel E. Cohen and Dexter Senft, Gaps of size 2, 4, and (conditionally) 6 between successive odd composite numbers occur infinitely often, Notes on Number Theory and Discrete Mathematics, Volume 31, Number 3, 494-503 (2025). See p. 495.
- Péter L. Erdős, Gergely Harcos, Shubha R. Kharel, Péter Maga, Tamás Róbert Mezei and Zoltán Toroczkai, The sequence of prime gaps is graphic, Mathematische Annalen 388 (2024), 2195-2215.
- D. A. Goldston, S. W. Graham, J. Pintz and C. Y. Yildirim, Small gaps between primes and almost primes, arXiv:math/0506067 [math.NT], 2005.
- D. A. Goldston and A. H. Ledoan, On the differences between consecutive prime numbers, I", arXiv:1111.3380v1 [math.NT], Nov 14, 2011.
- D. A. Goldston, J. Pintz, and C. Y. Yildirim, Positive Proportion of Small Gaps Between Consecutive Primes, arXiv:1103.3986 [math.NT], Mar 21, 2011.
- D. R. Heath-Brown and H. Iwaniec, On the difference between consecutive primes, Bull. Amer. Math. Soc. 1 (1979), 758-760.
- Alexei Kourbatov, Tables of record gaps between prime constellations, arXiv preprint arXiv:1309.4053 [math.NT], 2013.
- Alexei Kourbatov, The distribution of maximal prime gaps in Cramer's probabilistic model of primes, arXiv preprint arXiv:1401.6959 [math.NT], 2014.
- The Polymath project, Bounded gaps between primes
- Carlos Rivera, Conjecture 82. Average of log Dn / log(logPn) equal R = 0,877 08..., The Prime Puzzles & Problems Connection.
- Hisanobu Shinya, On the density of prime differences less than a given magnitude which satisfy a certain inequality, arXiv:0809.3458 [math.GM], 2008-2011.
- K. Soundararajan, Small gaps between prime numbers: the work of Goldston-Pintz-Yildirim, Bull. Amer. Math. Soc., 44 (2007), 1-18.
- Eric Weisstein's World of Mathematics, Andrica's Conjecture
- Eric Weisstein's World of Mathematics, Prime Difference Function
- Yasuo Yamasaki and Aiichi Yamasaki, On the Gap Distribution of Prime Numbers, Kyoto University Research Information Repository, October 1994. MR1370273 (97a:11141).
- Yitang Zhang, Bounded gaps between primes, Annals of Mathematics 179 (2014), 1121-1174.
- Index entries for primes, gaps between
Crossrefs
Programs
-
Haskell
a001223 n = a001223_list !! (n-1) a001223_list = zipWith (-) (tail a000040_list) a000040_list -- Reinhard Zumkeller, Oct 29 2011
-
Magma
[(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
-
Maple
with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
-
Mathematica
Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
-
PARI
diff(v)=vector(#v-1,i,v[i+1]-v[i]); diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
-
PARI
forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
-
Python
from sympy import prime def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
-
Sage
differences(prime_range(1000)) # Joerg Arndt, May 15 2011
Formula
G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023
Extensions
More terms from James Sellers, Feb 19 2001
Comments