The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123119 Number of digits in sum of first n primes (A007504). 1

%I #19 Jan 26 2019 19:35:14

%S 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,

%T 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,

%U 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

%N Number of digits in sum of first n primes (A007504).

%C Since A007504(n) has the asymptotic expression ~ n^2 * log(n) / 2, a(n) has the asymptotic expression n^2 * log(n) / 2 = floor(log_10(10* n^2 * log(n) / 2)) = floor(log_10(5* n^2 * log(n))) = floor(log_10(5) + log_10(n^2) + log_10(log(n))) = floor(0.698970004 + 2*log_10(n) + log_10(log(n))). What is the smallest n such that a(n) = 5, 6, 7, ...?

%H Harvey P. Dale, <a href="/A123119/b123119.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A055642(A007504(n)) = floor(log_10(10*A007504(n))) = A004216(A007504(n)) + 1 = A004218(A007504(n) + 1).

%e a(3) = 2 because 2 + 3 + 5 = 10 has 2 digits in its decimal expansion.

%t f[n_] := Floor[ Log[10, Sum[Prime@i, {i, n}]] + 1]; Array[f, 105] (* _Robert G. Wilson v_ *)

%t f[n_] := IntegerLength[Total[Prime[Range[n]]]]; Array[f, 105] (* _Jan Mangaldan_, Jan 04 2017 *)

%t IntegerLength/@Accumulate[Prime[Range[110]]] (* _Harvey P. Dale_, Jan 26 2019 *)

%Y Cf. A000040, A000041, A004216, A004218, A034386, A055642, A111287.

%K base,nonn

%O 1,3

%A _Jonathan Vos Post_, Sep 28 2006

%E More terms from _Robert G. Wilson v_, Oct 05 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 14:46 EDT 2024. Contains 372533 sequences. (Running on oeis4.)