login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A284263 a(n) = A252459(2*A000040(n)), a(0) = 0 by convention. 2
0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(0) = 0, for n >= 1, a(n) = A252459(2*A000040(n)).
a(n) = A252459(A002110(n)).
MATHEMATICA
a[n_] := If[n<1, 0, Block[{k=1}, While[Prime[n + k - 1] > Prime[k]^2, k++]; k - 1]]; Table[a[n], {n, 0, 130}] (* Indranil Ghosh, Mar 24 2017 *)
PROG
(PARI) A284263(n) = { my(k=1); if(0==n, 0, while(prime(n+k-1) > (prime(k)^2), k = k+1); (k-1)); };
(Scheme) (define (A284263 n) (if (zero? n) n (A252459 (* 2 (A000040 n)))))
(Python)
from sympy import prime
def a(n):
if n<1: return 0
k=1
while prime(n + k - 1)>prime(k)**2:k+=1
return k - 1 # Indranil Ghosh, Mar 24 2017
CROSSREFS
Sequence in context: A165118 A342882 A025423 * A087233 A104147 A227568
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 24 2017
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 11:11 EDT 2024. Contains 371936 sequences. (Running on oeis4.)