The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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

%I #14 Mar 24 2017 22:00:03

%S 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,

%T 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,

%U 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

%N a(n) = A252459(2*A000040(n)), a(0) = 0 by convention.

%H Antti Karttunen, <a href="/A284263/b284263.txt">Table of n, a(n) for n = 0..11000</a>

%F a(0) = 0, for n >= 1, a(n) = A252459(2*A000040(n)).

%F a(n) = A252459(A002110(n)).

%t 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 *)

%o (PARI) A284263(n) = { my(k=1); if(0==n, 0, while(prime(n+k-1) > (prime(k)^2), k = k+1);(k-1)); };

%o (Scheme) (define (A284263 n) (if (zero? n) n (A252459 (* 2 (A000040 n)))))

%o (Python)

%o from sympy import prime

%o def a(n):

%o if n<1: return 0

%o k=1

%o while prime(n + k - 1)>prime(k)**2:k+=1

%o return k - 1 # _Indranil Ghosh_, Mar 24 2017

%Y Cf. A000040, A002110, A251719, A252459, A284262.

%K nonn

%O 0,5

%A _Antti Karttunen_, Mar 24 2017

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 June 16 02:19 EDT 2024. Contains 373416 sequences. (Running on oeis4.)