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!)
A152186 a(1)=2; then: if n is even, a(n)=next_square_after a(n - 1), else a(n)=next_prime_after a(n - 1). 0

%I #2 Mar 30 2012 17:26:28

%S 2,4,5,9,11,16,17,25,29,36,37,49,53,64,67,81,83,100,101,121,127,144,

%T 149,169,173,196,197,225,227,256,257,289,293,324,331,361,367,400,401,

%U 441,443,484,487,529,541,576,577,625,631,676,677,729,733,784,787,841,853

%N a(1)=2; then: if n is even, a(n)=next_square_after a(n - 1), else a(n)=next_prime_after a(n - 1).

%t a[1] = 2; a[n_] := If[EvenQ[n], Ceiling[Sqrt[a[n - 1]]]^2, NextPrime[a[n - 1]]] Table[a[n], {n, 100}]

%Y Terms 9, 11, 16, 17, 25, 29 are in A035552: pure occasion or what?

%K nonn

%O 1,1

%A _Zak Seidov_, Nov 28 2008

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 July 15 09:15 EDT 2024. Contains 374324 sequences. (Running on oeis4.)