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

A085237 Nondecreasing gaps between primes.

Original entry on oeis.org

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

Views

Author

Farideh Firoozbakht, Aug 11 2003

Keywords

Comments

All terms of A005250 are in the sequence, but some terms of A005250 appear in this sequence more than once.
a(n) is the gap between the n-th and (n+1)-th sublists of prime numbers defined in A348178. - Ya-Ping Lu, Oct 19 2021

Examples

			a(21) = a(22) = 34 because prime(218) - prime(217) = prime(1060) - prime(1059) = 34 and prime(n+1) - prime(n) is less than 34, for n < 1059 and n not equal to 217.
		

References

  • R. K. Guy, Unsolved problems in number theory.

Crossrefs

Programs

  • Mathematica
    f[n_] := Prime[n+1]-Prime[n]; v={}; Do[ If[f[n]>=If[n==1, 1, v[[ -1]]], v1=n; v=Append[v, f[v1]]; Print[v]], {n, 105000000}]
    DeleteDuplicates[Differences[Prime[Range[10^7]]],Greater] (* Harvey P. Dale, Jan 17 2024 *)
  • Python
    from sympy import nextprime; p, r = 2, 0
    while r < 778:
        q = nextprime(p); g = q - p
        if g >= r: print(g, end = ', '); r = g
        p = q # Ya-Ping Lu, Jan 23 2024

Extensions

a(53)-a(63) from Donovan Johnson, Nov 24 2008
a(64)-a(76) from Charles R Greathouse IV, May 09 2011
a(77)-a(79) from Charles R Greathouse IV, May 19 2011

A134266 Primes associated with the prime gaps listed in A085237.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 47, 53, 61, 73, 83, 89, 113, 293, 317, 523, 887, 1129, 1327, 8467, 9551, 12853, 14107, 15683, 19609, 25471, 31397, 155921, 338033, 360653, 370261, 492113, 1349533, 1357201, 1561919, 2010733, 4652353, 11113933, 15203977, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783
Offset: 1

Views

Author

David W. Wilson, Dec 31 2007

Keywords

Comments

The smallest prime p(n) such that p(n+1)-p(n) is nondecreasing. The smallest prime p(n) such that (p(n+1)/p(n))^p(n) is increasing. [Thomas Ordowski, May 26 2012]
a(n) is the last prime in the n-th sublist of prime numbers defined in A348178. - Ya-Ping Lu, Oct 19 2021

Crossrefs

See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).
Cf. A348178.

Programs

  • Python
    from sympy import nextprime; p, r = 2, 0
    while p < 2*10**8:
        q = nextprime(p); g = q - p
        if g >= r: print(p, end = ', '); r = g
        p = q # Ya-Ping Lu, Jan 23 2024

Formula

a(n) = A000040(A085500(n)). - M. F. Hasler, Apr 26 2014

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
Showing 1-3 of 3 results.