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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A137661 a(n+1) = if a(n) is prime then (number of primes so far) else (number of nonprimes so far), a(1) = 1. 2

%I

%S 1,1,2,1,3,2,3,4,4,5,5,6,6,7,7,8,8,9,10,11,9,12,13,10,14,15,16,17,11,

%T 12,18,19,13,14,20,21,22,23,15,24,25,26,27,28,29,16,30,31,17,18,32,33,

%U 34,35,36,37,19,20,38,39,40,41,21,42,43,22,44,45,46,47,23,24,48,49,50,51

%N a(n+1) = if a(n) is prime then (number of primes so far) else (number of nonprimes so far), a(1) = 1.

%C All terms greater than 1 occur exactly twice: a(A137662(n)) = a(n).

%H R. Zumkeller, <a href="/A137661/b137661.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n+1) = A005171(a(n))*Sum(A005171(a(k)):1<=k<=n) + A010051(a(n))*Sum(A010051(a(k)):1<=k<=n).

%K nonn

%O 1,3

%A _Reinhard Zumkeller_, Feb 04 2008

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 December 3 12:33 EST 2020. Contains 338904 sequences. (Running on oeis4.)