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!)
A071578 Number of iterations of Pi(n) needed to reach 1, where Pi(x) denotes the number of primes <= x. 1
0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = a(Pi(n))+1.
a(n) = A060197(n-1) - 2. - Filip Zaludek, Dec 10 2016
MATHEMATICA
Table[Length[NestWhileList[PrimePi[#]&, n, #!=1&]]-1, {n, 110}] (* Harvey P. Dale, Dec 24 2018 *)
PROG
(PARI) for(n=2, 150, s=n; t=0; while(s!=1, t++; s=sum(i=2, s, isprime(i)); if(s==1, print1(t, ", "); ); ))
CROSSREFS
Cf. A000720.
Sequence in context: A077463 A084556 A084506 * A364800 A157791 A236857
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 31 2002
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 March 19 04:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)