cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A002386 Primes (lower end) with record gaps to the next consecutive prime: primes p(k) where p(k+1) - p(k) exceeds p(j+1) - p(j) for all j < k.

This page as a plain text file.
%I A002386 M0858 N0327 #165 Feb 16 2025 08:32:25
%S A002386 2,3,7,23,89,113,523,887,1129,1327,9551,15683,19609,31397,155921,
%T A002386 360653,370261,492113,1349533,1357201,2010733,4652353,17051707,
%U A002386 20831323,47326693,122164747,189695659,191912783,387096133,436273009,1294268491
%N A002386 Primes (lower end) with record gaps to the next consecutive prime: primes p(k) where p(k+1) - p(k) exceeds p(j+1) - p(j) for all j < k.
%C A002386 See the links by _Jens Kruse Andersen_ et al. for very large gaps.
%D A002386 B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
%D A002386 D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 6.1, Table 1.
%D A002386 M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 14.
%D A002386 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A002386 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A002386 Brian Kehrig, <a href="/A002386/b002386.txt">Table of n, a(n) for n = 1..83</a> (first 75 terms from M. F. Hasler and N. J. A. Sloane, terms n = 76..77 added by Charles R Greathouse IV)
%H A002386 R. K. Guy, <a href="/A000978/a000978.pdf">Letter to N. J. A. Sloane, Aug 1986</a>
%H A002386 R. K. Guy, <a href="/A005667/a005667.pdf">Letter to N. J. A. Sloane, 1987</a>
%H A002386 Lutz Kämmerer, <a href="https://arxiv.org/abs/2012.14263">A fast probabilistic component-by-component construction of exactly integrating rank-1 lattices and applications</a>, arXiv:2012.14263 [math.NA], 2020.
%H A002386 Jens Kruse Andersen and Norman Luhn, <a href="https://www.pzktupel.de/JensKruseAndersen/risinggap.php">Record Prime Gaps</a>
%H A002386 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 A002386 Alexei Kourbatov, <a href="https://arxiv.org/abs/1506.03042">Upper bounds for prime gaps related to Firoozbakht's conjecture</a>, arXiv:1506.03042 [math.NT], 2015; and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Kourbatov/kourb7.html">J. Int. Seq. 18 (2015) #15.11.2</a>.
%H A002386 Alexei Kourbatov and Marek Wolf, <a href="http://arxiv.org/abs/1901.03785">Predicting maximal gaps in sets of primes</a>, arXiv preprint arXiv:1901.03785 [math.NT], 2019.
%H A002386 Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/gaps/gaplist.html">First occurrence prime gaps</a> [For local copy see A000101]
%H A002386 Thomas R. Nicely, <a href="http://dx.doi.org/10.1090/S0025-5718-99-01065-0">New maximal prime gaps and first occurrences</a>, Math. Comput. 68,227 (1999) 1311-1315.
%H A002386 Tomás Oliveira e Silva, <a href="http://sweet.ua.pt/tos/gaps.html">Gaps between consecutive primes</a>
%H A002386 D. Shanks, <a href="http://dx.doi.org/10.1090/S0025-5718-1964-0167472-8">On maximal gaps between successive primes</a>, Math. Comp., 18 (1964), 646-651.
%H A002386 Matt Visser, <a href="https://arxiv.org/abs/1904.00499">Verifying the Firoozbakht, Nicholson, and Farhadian conjectures up to the 81st maximal prime gap</a>, arXiv:1904.00499 [math.NT], 2019.
%H A002386 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeGaps.html">Prime Gaps</a>
%H A002386 Wikipedia, <a href="https://en.wikipedia.org/wiki/Prime_gap">Prime gap</a>
%H A002386 Robert G. Wilson v, <a href="/A005250/a005250.pdf">Notes (no date)</a>
%H A002386 J. Young and A. Potler, <a href="http://dx.doi.org/10.1090/S0025-5718-1989-0947470-1">First occurrence prime gaps</a>, Math. Comp., 52 (1989), 221-224.
%H A002386 <a href="/index/Pri#gaps">Index entries for primes, gaps between</a>
%F A002386 a(n) = A000101(n) - A005250(n) = A008950(n-1) - 1. - _M. F. Hasler_, Dec 13 2007
%F A002386 A000720(a(n)) = A005669(n).
%F A002386 a(n) = A000040(A005669(n)). - _M. F. Hasler_, Apr 26 2014
%t A002386 s = {2}; gm = 1; Do[p = Prime[n]; g = Prime[n + 1] - p; If[g > gm, Print[p]; AppendTo[s, p]; gm = g], {n, 2, 1000000}]; s   (* _Jean-François Alcover_, Mar 31 2011 *)
%t A002386 Module[{nn=10^7,pr,df},pr=Prime[Range[nn]];df=Differences[pr];DeleteDuplicates[ Thread[ {Most[ pr],df}],GreaterEqual[#1[[2]],#2[[2]]]&]][[All,1]] (* The program generates the first 26 terms of the sequence. *) (* _Harvey P. Dale_, Sep 24 2022 *)
%o A002386 (PARI) a(n)=local(p,g);if(n<2,2*(n>0),p=a(n-1);g=nextprime(p+1)-p;while(p=nextprime(p+1),if(nextprime(p+1)-p>g,break));p) /* _Michael Somos_, Feb 07 2004 */
%o A002386 (PARI) p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p && print1(q-g=q-p,","),) \\ _M. F. Hasler_, Dec 13 2007
%Y A002386 Cf. A000040, A001223, A000101 (upper ends), A005250 (record gaps), A000230, A111870, A111943.
%Y A002386 Cf. A005669, A134266, A070866.
%Y A002386 See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).
%K A002386 nonn,nice
%O A002386 1,1
%A A002386 _N. J. A. Sloane_
%E A002386 Definition clarified by _Harvey P. Dale_, Sep 24 2022