OFFSET
0,2
COMMENTS
Partial sums of A046719(n) = n*A006879(n). In other words, a(n) is the number of digits used in writing out all {A006880(n)} primes below 10^n. - Lekraj Beedassy, Dec 13 2007
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..28
FORMULA
a(n) = Sum_{k=0..n} k * A006879(k). - Amiram Eldar, Jul 04 2024
EXAMPLE
There are 25 primes < 100; 4 of them are 1-digit numbers and 21 are 2-digit numbers. Thus a(2) = 4 + 21*2 = 46.
MATHEMATICA
Accumulate[Table[n(PrimePi[10^n]-PrimePi[10^(n-1)]), {n, 0, 14}]] (* This generates the first 15 terms of the sequence, but if n exceeds 14 the function PrimePi in Mathematica cannot calculate it. *) (* Harvey P. Dale, Jun 13 2014 *)
PROG
(PARI) g(n) = for(j=0, n, s=0; forprime(x=2, 10^j, y=length(Str(x)); s+=y); print1(s", "))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Cino Hilliard, Sep 05 2004
EXTENSIONS
More terms derived from A006879 by R. J. Mathar, Oct 14 2010
STATUS
approved