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!)
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
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, 12, 18, 19, 13, 14, 20, 21, 22, 23, 15, 24, 25, 26, 27, 28, 29, 16, 30, 31, 17, 18, 32, 33, 34, 35, 36, 37, 19, 20, 38, 39, 40, 41, 21, 42, 43, 22, 44, 45, 46, 47, 23, 24, 48, 49, 50, 51 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

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

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

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

CROSSREFS

Sequence in context: A153583 A029163 A196191 * A289152 A285779 A319320

Adjacent sequences:  A137658 A137659 A137660 * A137662 A137663 A137664

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Feb 04 2008

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 October 31 11:50 EDT 2020. Contains 338101 sequences. (Running on oeis4.)