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!)
A091987 Number of steps required for initial p = 2^n to reach 0 in the recurrence p = pi(p). 0
1, 2, 3, 4, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Andrew Booker, The Nth Prime Page.
FORMULA
pi(n) = A000720(n) = number of primes less than or equal to n. By repeating n=pi(n), n will reach 0 in a finite number of steps.
EXAMPLE
Pi(32) = 11
Pi(11) = 5
Pi(5) = 3
Pi(3) = 2
Pi(2) = 1
Pi(1) = 0
Total steps to reach 0 = 6. Thus 6 is the 6th entry in the sequence corresponding to n=5.
MATHEMATICA
Table[Length[NestWhileList[PrimePi, 2^n, #>0&]]-1, {n, 0, 40}] (* Harvey P. Dale, May 29 2016 *)
PROG
(PARI) pr2n(n) = my(c); for(x=0, n, y=2^x; c=0; p=y; while(p, p = primepi(p); c++); print1(c", "))
CROSSREFS
Cf. A000720.
Sequence in context: A236561 A352499 A110010 * A357149 A025544 A327706
KEYWORD
hard,nonn
AUTHOR
Cino Hilliard, Mar 16 2004
EXTENSIONS
More terms from Harvey P. Dale, May 29 2016
a(41)-a(64) from Chai Wah Wu, May 25 2018
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)