A123119 Number of digits in sum of first n primes (A007504).
1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1
Examples
a(3) = 2 because 2 + 3 + 5 = 10 has 2 digits in its decimal expansion.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[n_] := Floor[ Log[10, Sum[Prime@i, {i, n}]] + 1]; Array[f, 105] (* Robert G. Wilson v *) f[n_] := IntegerLength[Total[Prime[Range[n]]]]; Array[f, 105] (* Jan Mangaldan, Jan 04 2017 *) IntegerLength/@Accumulate[Prime[Range[110]]] (* Harvey P. Dale, Jan 26 2019 *)
Formula
Extensions
More terms from Robert G. Wilson v, Oct 05 2006
Comments