OFFSET
0,2
COMMENTS
The number 1 is omitted from the count as it is neither prime nor composite
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..29 (calculated using the b-file at A006880)
Chris Caldwell, The Prime Pages, How many primes are there? Table 1. Values of pi(x).
FORMULA
EXAMPLE
10^3 = 1000. 1000-2 = 998. a(3) = 830 because the 830 composites+168 primes must total 998.
MATHEMATICA
Table[10^i-PrimePi[10^i]-2, {i, 14}] (* Harvey P. Dale, Oct 01 2011 *) (* Mathematica's implementation of PrimePi does not work for 10^15 or above *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Enoch Haga, Mar 08 2004
EXTENSIONS
Edited by Max Alekseyev, Aug 15 2013
STATUS
approved