login
a(n) = pi(pi(n)), where pi = A000720.
4

%I #20 Jan 21 2016 05:28:53

%S 0,0,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,

%T 5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,

%U 8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9

%N a(n) = pi(pi(n)), where pi = A000720.

%C a(n) = a(n-1) + 1 if n is in A006450, otherwise a(n) = a(n-1). - _Robert Israel_, Jan 20 2016

%H R. Zumkeller, <a href="/A132090/b132090.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) ~ n/log^2 n. - _Charles R Greathouse IV_, Aug 12 2014

%p map(numtheory:-pi@@2,[$1..100]); # _Robert Israel_, Jan 20 2016

%t PrimePi@ PrimePi@ Range@ 105 (* _Robert G. Wilson v_, Jan 20 2016 *)

%o (PARI) a(n)=primepi(primepi(n)) \\ _Charles R Greathouse IV_, Aug 12 2014

%o (Haskell)

%o a132090 = a000720 . a000720 -- _Reinhard Zumkeller_, Jun 23 2015

%Y Cf. A000720, A006450, A000040, A000720, A137588.

%K nonn

%O 1,5

%A _Jonathan Vos Post_, Sep 03 2007