login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307325 a(n) is the smallest number k for which prime(k+1) - prime(k) is greater than n. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

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

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

LINKS

Table of n, a(n) for n=1..55.

EXAMPLE

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.

PROG

(MATLAB) v=primes(1000000);

for u=1:100; ss=1;

    while and(v(ss+1)-v(ss)<=u, ss<length(v)-1); ss=ss+1; end;

    sol(u)=ss;

end

   sol

(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

CROSSREFS

Cf. A000040, A001223, A005250, A005669.

Cf. A053695.

Sequence in context: A340714 A292381 A233655 * A272196 A335057 A039887

Adjacent sequences:  A307322 A307323 A307324 * A307326 A307327 A307328

KEYWORD

nonn

AUTHOR

Marius A. Burtea, Apr 02 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 00:06 EDT 2021. Contains 345319 sequences. (Running on oeis4.)