OFFSET
0,2
FORMULA
Count the digits in the first 10^n primes.
a(n) = sum while positive from k=0 (10^n - A006880(k)). - Charles R Greathouse IV, Jul 09 2007
EXAMPLE
At a(1) there are 10^1 primes, 2 3 5 7 11 13 17 19 23 29, and the total number of digits is 16.
MATHEMATICA
Accumulate@Table[c = 0; i0 = If[n == 0, 1, 10^(n - 1) + 1]; For[i = i0, i <= 10^n, i++, c += IntegerLength[Prime[i]]]; c, {n, 0, 6}] (* Robert Price, Jun 09 2019 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, May 13 2006
EXTENSIONS
Corrected and extended by Charles R Greathouse IV, Jul 09 2007
STATUS
approved