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(100) = 25
Pi(25) = 9
Pi(9) = 4
Pi(4) = 2
Pi(2) = 1
Pi(1) = 0
Total steps to reach 0 = 6. Thus 6 is the 3rd entry in the sequence corresponding to n=2.
PROG
(PARI) pr10n(n) = my(c); for(x=0, n, y=10^x; c=0; p=y; while(p, p = primepi(p); c++); print1(c", "))
CROSSREFS
KEYWORD
hard,nonn
AUTHOR
Cino Hilliard, Mar 16 2004
EXTENSIONS
a(14)-a(19) from Chai Wah Wu, May 25 2018
STATUS
approved