%I M0296 N0108 #318 Apr 12 2024 16:49:43
%S 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,
%T 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,
%U 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
%N Prime gaps: differences between consecutive primes.
%C There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - _Rémi Eismann_, Feb 14 2008
%C Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - _John W. Nicholson_, Dec 14 2011
%C A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - _L. Edson Jeffery_, Oct 01 2014
%C There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - _Thomas Ordowski_, Oct 11 2014
%C a(n) = A008347(n+1) - A008347(n-1). - _Reinhard Zumkeller_, Feb 09 2015
%C Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - _Robert Israel_, Feb 12 2015
%C lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - _Thomas Ordowski_, Mar 09 2015
%C a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - _Reinhard Zumkeller_, Aug 23 2015
%C If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - _Andres Cicuttin_, Jul 14 2016
%C Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - _Andres Cicuttin_, Sep 23 2018
%C Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - _Andres Cicuttin_, Sep 29 2018
%C Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - _Andres Cicuttin_, Sep 29 2018
%C Row m of A174349 lists all indices n for which a(n) = 2m. - _M. F. Hasler_, Oct 26 2018
%C Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - _M. F. Hasler_, Oct 26 2018
%C Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
%C lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
%C lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - _Andres Cicuttin_, Sep 01 2019
%D 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.
%D GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vojtech Strnad, <a href="/A001223/b001223.txt">First 100000 terms</a> [First 10000 terms from N. J. A. Sloane]
%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H Anonymous ["TheHereticAnthem20"], <a href="https://www.youtube.com/watch?v=Y-AB_IQfLMQ">Prime gaps mapped to sounds</a>, Youtube video (2018).
%H B. Apostol, L. Panaitopol, L Petrescu, and L. Toth, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Toth/toth21.html">Some Properties of a Sequence Defined with the Aid of Prime Numbers</a>, J. Int. Seq. 18 (2015) # 15.5.5.
%H S. Ares and M. Castro, <a href="http://arXiv.org/abs/cond-mat/0310148">Hidden structure in the randomness of the prime number sequence?</a>, arXiv:cond-mat/0310148 [cond-mat.stat-mech], 2003-2005.
%H József Beck, <a href="http://bookstore.ams.org/ulect-49/21">Inevitable randomness in discrete mathematics</a>, 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.
%H Chris K. Caldwell, <a href="https://primes.utm.edu/glossary/page.php?sort=PrimeKtupleConjecture">Prime k-tuple conjecture</a>, Prime Pages' Glossary entry.
%H D. A. Goldston, S. W. Graham, J. Pintz and C. Y. Yildirim, <a href="http://arXiv.org/abs/math.NT/0506067">Small gaps between primes and almost primes</a>, arXiv:math/0506067 [math.NT], 2005.
%H D. A. Goldston and A. H. Ledoan, <a href="http://arxiv.org/abs/1111.3380">On the differences between consecutive prime numbers, I"</a>, arXiv:1111.3380v1 [math.NT], Nov 14, 2011.
%H D. A. Goldston, J. Pintz, and C. Y. Yildirim, <a href="http://arxiv.org/abs/1103.3986">Positive Proportion of Small Gaps Between Consecutive Primes</a>, arXiv:1103.3986 [math.NT], Mar 21, 2011.
%H D. R. Heath-Brown and H. Iwaniec, <a href="http://dx.doi.org/10.1090/S0273-0979-1979-14654-8">On the difference between consecutive primes</a>, Bull. Amer. Math. Soc. 1 (1979), 758-760.
%H Alexei Kourbatov, <a href="http://arxiv.org/abs/1309.4053">Tables of record gaps between prime constellations</a>, arXiv preprint arXiv:1309.4053 [math.NT], 2013.
%H Alexei Kourbatov, <a href="http://arxiv.org/abs/1401.6959">The distribution of maximal prime gaps in Cramer's probabilistic model of primes</a>, arXiv preprint arXiv:1401.6959 [math.NT], 2014.
%H The Polymath project, <a href="http://michaelnielsen.org/polymath1/index.php?title=Bounded_gaps_between_primes">Bounded gaps between primes</a>
%H Carlos Rivera, <a href="https://www.primepuzzles.net/conjectures/conj_082.htm">Conjecture 82. Average of log Dn / log(logPn) equal R = 0,877 08...</a>, The Prime Puzzles & Problems Connection.
%H Hisanobu Shinya, <a href="http://arxiv.org/abs/0809.3458">On the density of prime differences less than a given magnitude which satisfy a certain inequality</a>, arXiv:0809.3458 [math.GM], 2008-2011.
%H K. Soundararajan, <a href="http://dx.doi.org/10.1090/S0273-0979-06-01142-6">Small gaps between prime numbers: the work of Goldston-Pintz-Yildirim</a>, Bull. Amer. Math. Soc., 44 (2007), 1-18.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AndricasConjecture.html">Andrica's Conjecture</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeDifferenceFunction.html">Prime Difference Function</a>
%H Yasuo Yamasaki and Aiichi Yamasaki, <a href="https://repository.kulib.kyoto-u.ac.jp/dspace/bitstream/2433/84326/1/0887-10.pdf">On the Gap Distribution of Prime Numbers</a>, Kyoto University Research Information Repository, October 1994. MR1370273 (97a:11141).
%H Yitang Zhang, <a href="https://doi.org/10.4007/annals.2014.179.3.7"> Bounded gaps between primes</a>, Annals of Mathematics 179 (2014), 1121-1174.
%H <a href="/index/Pri#gaps">Index entries for primes, gaps between</a>
%F G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - _Franklin T. Adams-Watters_, Jun 15 2006
%F a(n) = prime(n+1) - prime(n). - _Franklin T. Adams-Watters_, Mar 31 2010
%F 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
%F A167770(n) == a(n)^2 (mod A000040(n+1)). - _L. Edson Jeffery_, Oct 01 2014
%F 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
%F G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - _Benedict W. J. Irwin_, Jun 13 2016
%F 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
%F 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
%F 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
%p with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
%t Differences[Prime[Range[100]]] (* _Harvey P. Dale_, May 15 2011 *)
%o (Sage) differences(prime_range(1000)) # _Joerg Arndt_, May 15 2011
%o (PARI) diff(v)=vector(#v-1,i,v[i+1]-v[i]);
%o diff(primes(100)) \\ _Charles R Greathouse IV_, Feb 11 2011
%o (PARI) forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ _Felix Fröhlich_, Sep 06 2014
%o (Magma) [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // _Vincenzo Librandi_, Apr 02 2011
%o (Haskell)
%o a001223 n = a001223_list !! (n-1)
%o a001223_list = zipWith (-) (tail a000040_list) a000040_list
%o -- _Reinhard Zumkeller_, Oct 29 2011
%o (Python)
%o from sympy import prime
%o def A001223(n): return prime(n+1)-prime(n) # _Chai Wah Wu_, Jul 07 2022
%Y Cf. A000040 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
%Y Second difference is A036263, first occurrence is A000230.
%Y For records see A005250, A005669.
%Y Cf. A038664, A031131, A031165, A031166, A031167, A031168, A031169, A031170, A031171, A031172.
%Y Cf. A174349, A029707, A029709, A320701, ..., A320720.
%Y Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.
%K nonn,nice,easy,hear
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _James A. Sellers_, Feb 19 2001
|