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!)
A068670 Number of digits in the concatenation of first n primes. 11

%I #53 Feb 03 2023 14:58:30

%S 0,1,2,3,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,

%T 46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,

%U 109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154

%N Number of digits in the concatenation of first n primes.

%C Partial sums of A097944. - _Lekraj Beedassy_, Aug 26 2008

%H Charles R Greathouse IV, <a href="/A068670/b068670.txt">Table of n, a(n) for n = 0..10000</a>. (Initial 0 added by _M. F. Hasler_, Nov 02 2019.)

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Copeland-ErdosConstant.html">Copeland-Erdos Constant</a>

%F a(n) = Sum_{i=1..n} ceiling(log_10(1 + prime(i))). - _Daniel Forgues_, Apr 02 2014

%e a(5) is 6 because concatenating the first five primes gives 235711, which has six digits.

%t Table[n + Sum[Floor[Log[10, Prime[k]]], {k, 1, n}], {n, 1, 90}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 12 2006 *)

%t Accumulate[IntegerLength[Prime[Range[70]]]] (* _Harvey P. Dale_, Jul 01 2012 *)

%o (Magma) a068670:=func< n | n + &+[ Floor(Log(10, NthPrime(k))): k in [1..n] ] >; [ a068670(n): n in [1..70] ];

%o (PARI) A68670=List(0); A068670(n)={for(N=#A68670,n, listput(A68670, A68670[N] + A097944(N))); A68670[n+1]} \\ _M. F. Hasler_, Oct 24 2019

%o (Python)

%o from sympy import sieve

%o from itertools import accumulate, chain

%o def f(_, n): return _ + len(str(n))

%o def agen(): yield from accumulate(chain((0,), (p for p in sieve)), f)

%o print(list(islice(agen(), 62))) # _Michael S. Branicky_, Feb 03 2023

%Y Cf. A019518, A097944 (number of decimal digits of the primes).

%Y Cf. A033308 (decimal expansion of the Copeland-Erdos constant).

%K nonn,base

%O 0,3

%A Eugene McDonnell (eemcd(AT)mac.com), Jan 18 2004

%E Extended to a(0) = 0 by _M. F. Hasler_, Oct 24 2019

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 April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)