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-4 of 4 results.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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).

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)).

Programs

  • 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 *)
  • 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

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

Extensions

Definition clarified by Harvey P. Dale, Sep 24 2022

A070865 Smallest prime such that the difference of successive terms is strictly increasing.

Original entry on oeis.org

2, 3, 5, 11, 19, 29, 41, 59, 79, 101, 127, 157, 191, 227, 269, 313, 359, 409, 461, 521, 587, 659, 733, 809, 887, 967, 1049, 1151, 1259, 1373, 1489, 1607, 1733, 1861, 1993, 2129, 2267, 2411, 2557, 2707, 2861, 3019, 3181, 3347, 3517, 3691, 3877, 4073, 4271
Offset: 1

Views

Author

Amarnath Murthy, May 16 2002

Keywords

Comments

The slowest increasing sequence of primes with strictly increasing difference of successive terms. - Zak Seidov and Charles R Greathouse IV, May 01 2015

Crossrefs

Cf. A070866.

Programs

  • Mathematica
    d=0; p=2; t={p}; Do[d=NextPrime[p+d]-p; AppendTo[t,p+=d], {99}]; t (* Vladimir Joseph Stephan Orlovsky, May 29 2010 *)
    nxt[{a_,b_}]:={b,NextPrime[2b-a]}; Transpose[NestList[nxt,{2,3},50]][[1]] (* Harvey P. Dale, Jan 04 2015 *)
  • PARI
    t=0; print1(last=2); while(1, n=last+t; while(!isprime(n++), ); print1(", "n); t=n-last; last=n) \\ Charles R Greathouse IV, Apr 30 2015

Formula

a(n) >> n^2. - Charles R Greathouse IV, Apr 30 2015

Extensions

Corrected and extended by Lior Manor, Jun 02 2002

A361823 a(1) = 3; thereafter, a(n+1) is the smallest prime p such that p - prevprime(p) >= a(n) - prevprime(a(n)).

Original entry on oeis.org

3, 5, 7, 11, 17, 23, 29, 37, 53, 59, 67, 79, 89, 97, 127, 307, 331, 541, 907, 1151, 1361, 8501, 9587, 12889, 14143, 15727, 19661, 25523, 31469, 156007, 338119, 360749, 370373, 492227, 1349651, 1357333, 1562051, 2010881, 4652507, 11114087, 15204131, 17051887
Offset: 1

Views

Author

Ya-Ping Lu, Mar 25 2023

Keywords

Comments

a(n) is the leading prime in the (n+1)-th prime sublist defined in A348178.

Crossrefs

Programs

  • PARI
    a361823(upto) = {my(pp=2, gap=1); forprime (p=3, upto, my(g=p-pp);if(g>=gap, print1(p,", "); gap=g); pp=p)};
    a361823(20000000) \\ Hugo Pfoertner, Apr 03 2023
  • Python
    from sympy import nextprime; q = 2; g = 0
    while q < 20000000:
        p = nextprime(q); d = p - q
        if d >= g: print(p, end = ', '); g = d
        q = p
    

Formula

a(n) = nextprime(A134266(n)). - Michel Marcus, Mar 30 2023

A178549 a(n) is a composite number at the start of an interval of consecutive integers, ending in a prime, and non-overlapping with and at least as long as the interval addressed by a(n-1).

Original entry on oeis.org

4, 6, 8, 12, 18, 24, 30, 38, 48, 60, 72, 84, 98, 114, 132, 150, 168, 192, 224, 258, 294, 332, 374, 420, 468, 522, 578, 642, 710, 788, 878, 968, 1062, 1164, 1278, 1400, 1524, 1658, 1802, 1950, 2100, 2252, 2412, 2580, 2750, 2928, 3110, 3300, 3492, 3692, 3908
Offset: 1

Views

Author

Keywords

Comments

Non-overlapping intervals of the integers of nondecreasing length, starting with a composite number and ending with a prime number, define an intermediate table (as below), the first column of which defines the sequence.
4, 5
6, 7
8, 9, 10, 11
12, 13, 14, 15, 16, 17
18, 19, 20, 21, 22, 23
24, 25, 26, 27, 28, 29
30, 31, 32, 33, 34, 35, 36, 37
38, 39, 40, 41, 42, 43, 44, 45, 46, 47
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71

Crossrefs

Programs

  • Mathematica
    PrimeNext[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k],k++ ];k]; d=0;p=2;lst={}; Do[d=PrimeNext[p+d]-p;p=p+=d;d--;AppendTo[lst,p+1],{n,0,5!}];lst

Formula

a(n) = 1 + A070866(n+1). - R. J. Mathar, Jun 07 2010

Extensions

Definition rephrased by R. J. Mathar, Jun 07 2010
Showing 1-4 of 4 results.