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

A100964 Smallest prime number that begins a prime gap of at least 2n.

Original entry on oeis.org

3, 7, 23, 89, 113, 113, 113, 523, 523, 887, 1129, 1327, 1327, 1327, 1327, 1327, 1327, 9551, 15683, 15683, 15683, 15683, 19609, 19609, 19609, 19609, 31397, 31397, 31397, 31397, 31397, 31397, 31397, 31397, 31397, 31397, 155921, 155921, 155921, 155921
Offset: 1

Views

Author

T. D. Noe, Nov 23 2004

Keywords

Examples

			a(5) = a(6) = a(7) = 113 because there is a gap of 14 between 113 and 127.
		

Crossrefs

Programs

  • Mathematica
    k=1; Table[While[Prime[k+1]-Prime[k] < 2n, k++ ]; Prime[k], {n, 48}]
  • PARI
    lista(pmax) = {my(k = 1, prv = 2, m = 2, kprv = 2); forprime(p = 3, pmax, k++; if(p - prv >= m, for(i = 1, (p - prv - m)/2 + 1, print1(prv, ", ")); m = p - prv + 2; kprv = k); prv = p);} \\ Amiram Eldar, Sep 06 2024

Formula

a(n) = prime(A144309(n)). - Michel Marcus, Nov 02 2013

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