OFFSET
1,2
LINKS
FORMULA
a(n) = pi(pi(pi(pi(10^n)))) where pi(x) is the number of primes <= x.
EXAMPLE
a(3) = pi(pi(pi(pi(10^3)))) = 5, the third entry in the table.
MATHEMATICA
f[n_] := Nest[PrimePi, 10^n, 4]; Table[ f[n], {n, 13}] (* Robert G. Wilson v, Dec 21 2004 *)
PROG
(PARI) nestpi(n, m) = { my(x, y, z); for(x=1, n, z=10^x; for(y=1, m, z=primepi(z)); print1(z", ")) } \\ try call nestpi(11, 4)
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Dec 15 2004
EXTENSIONS
a(10)-a(13) from Robert G. Wilson v, Dec 21 2004
a(14)-a(24) using Kim Walisch's primecount added by Amiram Eldar, Jun 29 2024
STATUS
approved