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.

Showing 1-6 of 6 results.

A243000 max {A053695(k) | k < n+2} - max {A053695(k) | k < n+1}.

Original entry on oeis.org

1, 0, 0, 4, 0, 0, 0, 6, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 4, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Farideh Firoozbakht, May 31 2014

Keywords

Crossrefs

A270878 Record differences between record prime gaps, that is, terms of A053695 that set a record.

Original entry on oeis.org

1, 2, 6, 12, 20, 26, 30, 32, 62, 100, 208
Offset: 1

Views

Author

Marc Morgenegg, Apr 05 2016

Keywords

Crossrefs

Extensions

Edited by N. J. A. Sloane, May 23 2016 at the suggestion of R. J. Mathar and Giovanni Resta.

A005250 Record gaps between primes.

Original entry on oeis.org

1, 2, 4, 6, 8, 14, 18, 20, 22, 34, 36, 44, 52, 72, 86, 96, 112, 114, 118, 132, 148, 154, 180, 210, 220, 222, 234, 248, 250, 282, 288, 292, 320, 336, 354, 382, 384, 394, 456, 464, 468, 474, 486, 490, 500, 514, 516, 532, 534, 540, 582, 588, 602, 652
Offset: 1

Views

Author

N. J. A. Sloane, R. K. Guy, May 20 1991

Keywords

Comments

Here a "gap" means prime(n+1) - prime(n), but in other references it can mean prime(n+1) - prime(n) - 1.
a(n+1)/a(n) <= 2, for all n <= 80, and a(n+1)/a(n) < 1 + f(n)/a(n) with f(n)/a(n) <= epsilon for some function f(n) and with 0 < epsilon <= 1. It also appears, with the small amount of data available, for all n <= 80, that a(n+1)/a(n) ~ 1. - John W. Nicholson, Jun 08 2014, updated Aug 05 2019
Equivalent to the above statement, A053695(n) = a(n+1) - a(n) <= a(n). - John W. Nicholson, Jan 20 2016
Conjecture: a(n) = O(n^2); specifically, a(n) <= n^2. - Alexei Kourbatov, Aug 05 2017
Conjecture: below the k-th prime, the number of maximal gaps is about 2*log(k), i.e., about twice as many as the expected number of records in a sequence of k i.i.d. random variables (see arXiv:1709.05508 for a heuristic explanation). - Alexei Kourbatov, Mar 16 2018

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
  • R. K. Guy, Unsolved Problems in Number Theory, A8.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Records in A001223. For positions of records see A005669.

Programs

  • Haskell
    a005250 n = a005250_list !! (n-1)
    a005250_list = f 0 a001223_list
       where f m (x:xs) = if x <= m then f m xs else x : f x xs
    -- Reinhard Zumkeller, Dec 12 2012
  • Mathematica
    nn=10^7;Module[{d=Differences[Prime[Range[nn]]],ls={1}},Table[If[d[[n]]> Last[ls],AppendTo[ls,d[[n]]]],{n,nn-1}];ls] (* Harvey P. Dale, Jul 23 2012 *)
    DeleteDuplicates[Differences[Prime[Range[10^7]]],GreaterEqual] (* The program generates the first 26 terms of the sequence. *) (* Harvey P. Dale, May 12 2022 *)
  • PARI
    p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p & print1(g=q-p,","),) \\ M. F. Hasler, Dec 13 2007
    
  • PARI
    p=2; g=0;m=g; forprime(q=3,10^13,g=q-p;if(g>m,print(g", ",p,", ",q);m=g);p=q) \\ John W. Nicholson, Dec 18 2016
    

Formula

a(n) = A000101(n) - A002386(n) = A008996(n-1) + 1. - M. F. Hasler, Dec 13 2007
a(n+1) = 1 + Sum_{i=1..n} A053695(i). - John W. Nicholson, Jan 20 2016

Extensions

More terms from Andreas Boerner (andreas.boerner(AT)altavista.net), Jul 11 2000
Additional comments from Frank Ellermann, Apr 20 2001
More terms from Robert G. Wilson v, Jan 03 2002, May 01 2006

A053686 Record gaps between consecutive primes that repeat at least once before a new record occurs.

Original entry on oeis.org

2, 4, 6, 14, 34, 36, 52, 86, 132, 154, 250, 336
Offset: 1

Views

Author

Jeff Burch, Mar 23 2000

Keywords

Comments

Scan the sequence of prime differences (A001223) looking for new records, but append the record difference to the present sequence only if the difference appears at least twice in A001223 before it is beaten by a new record. - N. J. A. Sloane, Dec 30 2007
The sequence of primes where these gaps first appear is A133788.
These are the numbers that appear two or more times in A085237. - David W. Wilson, Dec 31 2007

Crossrefs

Extensions

More terms from Naohiro Nomoto, Jul 23 2001
Corrected by Jorge Coveiro, Jul 24 2006
More terms from Sam Handler (sam_5_5_5_0(AT)yahoo.com), Sep 13 2006
There were still two erroneous terms. The terms a(1) - a(11) now shown have been verified by Farideh Firoozbakht, Dec 31 2007. Edited by N. J. A. Sloane, Jan 30 2008.
a(12) from Donovan Johnson, Nov 24 2008

A104138 Smallest prime followed by n or more composites.

Original entry on oeis.org

2, 3, 7, 7, 23, 23, 89, 89, 113, 113, 113, 113, 113, 113, 523, 523, 523, 523, 887, 887, 1129, 1129, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 9551, 9551, 15683, 15683, 15683, 15683, 15683, 15683, 15683, 15683, 19609
Offset: 0

Views

Author

Lekraj Beedassy, Mar 07 2005

Keywords

Comments

Except for a(1), records occur at even values of n, and each term appears an even number of times consecutively. (Proof. A maximal run of composites must begin and end at even numbers.) - Jonathan Sondow, May 31 2014

Examples

			a(10)=113 because it is the first prime occurring before primes 199,211,293,317,467,509,... all followed by at least ten successive composites.
		

Crossrefs

Formula

Record prime A002386(n+1) appears A053695(n-1) times, for n>1.
a(n) = A030296(n) - 1, for n > 0. - Jonathan Sondow, May 31 2014

Extensions

a(34) corrected by Charles R Greathouse IV, Aug 09 2011

A307325 a(n) is the smallest number k for which prime(k+1) - prime(k) is greater than n.

Original entry on oeis.org

2, 4, 4, 9, 9, 24, 24, 30, 30, 30, 30, 30, 30, 99, 99, 99, 99, 154, 154, 189, 189, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, 1183, 1183, 1831, 1831, 1831, 1831, 1831, 1831, 1831, 1831, 2225, 2225, 2225, 2225, 2225, 2225, 2225, 2225, 3385, 3385, 3385, 3385
Offset: 1

Views

Author

Marius A. Burtea, Apr 02 2019

Keywords

Comments

For any n there is an infinity of numbers m for which prime(m+1) - prime(m) is greater than n.
It appears that the sequence of lengths of successive runs is equal to A053695. - Marc Bofill Janer, May 21 2019

Examples

			For n = 2, prime(2) - prime(1) = 3 - 2 = 1, prime(3) - prime(2) = 5 - 3 = 2, prime(5) - prime(4) = 11 - 7 = 4, so a(2) = 4.
		

References

  • Laurențiu Panaitopol, Dinu Șerbănescu, Number theory and combinatorial problems for juniors, Ed.Gil, Zalău, (2003), ch. 1, p.7, pr. 25. (in Romanian).

Crossrefs

Programs

  • MATLAB
    v=primes(1000000);
    for u=1:100; ss=1;
        while and(v(ss+1)-v(ss)<=u,ss
    				
  • Magma
    v:=PrimesUpTo(10000000);
    sol:=[];
    for u in [1..60] do
       for ss in [1..#v-1] do
        if v[ss+1]-v[ss] gt u then
             sol[u]:=ss;
             break;
         end if;
       end for;
    end for;
       sol;
    
  • PARI
    a(n) = my(k=1); while(prime(k+1) - prime(k) <= n, k++); k; \\ Michel Marcus, Apr 03 2019

Formula

a(2*n) = a(2*n+1) = A144309(n+1) for n>=1. - Georg Fischer, Dec 05 2022
Showing 1-6 of 6 results.