|
|
A099824
|
|
a(n) = Sum of the first 10^n primes.
|
|
9
|
|
|
2, 129, 24133, 3682913, 496165411, 62260698721, 7472966967499, 870530414842019, 99262851056183695, 11138479445180240497, 1234379338586942892505, 135436174616790289414111, 14738971133550183905879827, 1593061976858155930556059673, 171191473337951767580578821529
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
Cino Hilliard, SumPrimes, June 2008. [broken link]
|
|
FORMULA
|
|
|
EXAMPLE
|
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
|
|
MATHEMATICA
|
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}]
|
|
PROG
|
(PARI) vecA099824(n)={ my(s, c, k=1, L:list); L=List();
forprime(m=2, prime(10^n), s+=m; c++; if(c==k, listput(L, s); k*=10));
return(vector(#L, i, L[i]))} \\ R. J. Cano, Aug 12 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(22) from David Baugh using Kim Walisch's primesum program, Jun 21 2016
a(23) from David Baugh using Kim Walisch's primesum program, Sep 26 2016
|
|
STATUS
|
approved
|
|
|
|