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!)
A213649 Smallest k such that there exists a square between prime(n) and prime(n+k). 1
2, 1, 2, 1, 2, 1, 3, 2, 1, 2, 1, 4, 3, 2, 1, 3, 2, 1, 4, 3, 2, 1, 3, 2, 1, 5, 4, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 7, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(A038107(n)) = 1 for n >= 2.

a(n) is of the form {S1} union {S2} union ... union {Sk} union ... where a subset Sk is of the form {xk, xk - 1, xk - 2, …, 1 }. We obtain a subsequence Max {Sn} = {xn} = {2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 4, 5, 5, 4, 6, 7, 5, 6, 6, 7, 7, 7, 6, 9, …}.

LINKS

Michel Lagneau, Table of n, a(n) for n = 1..5000

EXAMPLE

a(7)=3 because prime(7) = 17, prime(7+3) = 29 and  17 < 25 < 29 where 25 is square.

MAPLE

with(numtheory):for n from 1 to 100 do:ii:=0:for k from 1 to 100 while(ii=0) do:p1:=ithprime(n):p2:=ithprime(n+k):i:=0:for m from p1+1 to p2-1 do:c:=sqrt(m):if c=floor(c) then i:=i+1:else fi:od: if i<>0 then ii:=1:printf(`%d, `, k):else fi:od:od:

CROSSREFS

Cf. A038107, A014085.

Sequence in context: A082303 A316384 A029838 * A242397 A023132 A023124

Adjacent sequences:  A213646 A213647 A213648 * A213650 A213651 A213652

KEYWORD

nonn

AUTHOR

Michel Lagneau, Jun 17 2012

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 March 6 03:35 EST 2021. Contains 341841 sequences. (Running on oeis4.)