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!)
A099824 a(n) = Sum of the first 10^n primes. 9

%I #104 Aug 04 2023 02:44:58

%S 2,129,24133,3682913,496165411,62260698721,7472966967499,

%T 870530414842019,99262851056183695,11138479445180240497,

%U 1234379338586942892505,135436174616790289414111,14738971133550183905879827,1593061976858155930556059673,171191473337951767580578821529

%N a(n) = Sum of the first 10^n primes.

%H David Baugh, <a href="/A099824/b099824.txt">Table of n, a(n) for n = 0..23</a> [terms a(0)-a(17) from Marc Deleglise; terms a(18)-a(21) from Kim Walisch]

%H Cino Hilliard, <a href="http://groups.google.com/group/sumprimes/web/sum-of-primes-formulas">SumPrimes</a>, June 2008. [broken link]

%F a(n) = Sum_{i=1..10^n} A000040(i). - _José de Jesús Camacho Medina_, Dec 27 2014 (corrected by _Joerg Arndt_, Jan 05 2015)

%e For n=1, the sum of the first 10^1 = 10 primes is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 129, so a(1) = 129. - _Michael B. Porter_, Aug 08 2016

%t NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; k = p = 1; s = 0; Do[ While[p = NextPrim[p]; s = s + p; k < 10^n, k++ ]; k++; Print[s], {n, 0, 8}]

%t Table[Sum[Prime[i], {i, 10^n}], {n, 0, 5}] (* _José de Jesús Camacho Medina_, Dec 27 2014 *)

%o (PARI) vecA099824(n)={ my(s,c,k=1,L:list); L=List();

%o forprime(m=2,prime(10^n),s+=m;c++; if(c==k,listput(L,s);k*=10));

%o return(vector(#L,i,L[i]))} \\ _R. J. Cano_, Aug 12 2016

%Y Cf. A000040, A006988, A007504, A099825, A099826.

%K nonn

%O 0,1

%A _Robert G. Wilson v_, Oct 25 2004

%E a(9) from _Hans Havermann_, May 06 2005

%E a(10) from _Cino Hilliard_, Apr 28 2006

%E a(11) from _Cino Hilliard_, Oct 03 2006

%E a(12)-a(13) from _Hiroaki Yamanouchi_, Jul 06 2014

%E a(11) corrected by _Marc Deleglise_, Apr 03 2016

%E a(14)-a(17) from _Marc Deleglise_, Apr 03 2016

%E a(18)-a(20) from _Kim Walisch_, Jun 05 2016

%E a(21) from _Kim Walisch_, Jun 11 2016

%E a(22) from _David Baugh_ using Kim Walisch's primesum program, Jun 21 2016

%E a(23) from _David Baugh_ using Kim Walisch's primesum program, Sep 26 2016

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 March 28 16:28 EDT 2024. Contains 371254 sequences. (Running on oeis4.)