login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
(Formerly M0858 N0327)
122
2, 3, 7, 23, 89, 113, 523, 887, 1129, 1327, 9551, 15683, 19609, 31397, 155921, 360653, 370261, 492113, 1349533, 1357201, 2010733, 4652353, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783, 387096133, 436273009, 1294268491 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
See the links by Jens Kruse Andersen et al. for very large gaps.
REFERENCES
B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 6.1, Table 1.
M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 14.
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
M. F. Hasler, N. J. A. Sloane, and Charles R Greathouse IV, Table of n, a(n) for n = 1..80 [Added data from Thomas R. Nicely site. - John W. Nicholson, Oct 27 2021]
Jens Kruse Andersen, The Top-20 Prime Gaps
Jens Kruse Andersen, New largest known prime gap
Jens Kruse Andersen, Maximal gaps
Alexei Kourbatov, Tables of record gaps between prime constellations, arXiv preprint arXiv:1309.4053 [math.NT], 2013.
Alexei Kourbatov and Marek Wolf, Predicting maximal gaps in sets of primes, arXiv preprint arXiv:1901.03785 [math.NT], 2019.
Thomas R. Nicely, First occurrence prime gaps [For local copy see A000101]
Thomas R. Nicely, New maximal prime gaps and first occurrences, Math. Comput. 68,227 (1999) 1311-1315.
Tomás Oliveira e Silva, Gaps between consecutive primes
D. Shanks, On maximal gaps between successive primes, Math. Comp., 18 (1964), 646-651.
Eric Weisstein's World of Mathematics, Prime Gaps
Wikipedia, Prime gap
Robert G. Wilson v, Notes (no date)
J. Young and A. Potler, First occurrence prime gaps, Math. Comp., 52 (1989), 221-224.
FORMULA
a(n) = A000101(n) - A005250(n) = A008950(n-1) - 1. - M. F. Hasler, Dec 13 2007
A000720(a(n)) = A005669(n).
a(n) = A000040(A005669(n)). - M. F. Hasler, Apr 26 2014
MATHEMATICA
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 *)
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 *)
PROG
(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 */
(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
CROSSREFS
Cf. A000040, A001223, A000101 (upper ends), A005250 (record gaps), A000230, A111870, A111943.
See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).
Sequence in context: A359292 A163834 A335366 * A000230 A256454 A133429
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)