cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

2, 129, 24133, 3682913, 496165411, 62260698721, 7472966967499, 870530414842019, 99262851056183695, 11138479445180240497, 1234379338586942892505, 135436174616790289414111, 14738971133550183905879827, 1593061976858155930556059673, 171191473337951767580578821529
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Examples

			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
		

Crossrefs

Programs

  • 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}]
    Table[Sum[Prime[i], {i, 10^n}], {n, 0, 5}] (* José de Jesús Camacho Medina, Dec 27 2014 *)
  • 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

Formula

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)

Extensions

a(9) from Hans Havermann, May 06 2005
a(10) from Cino Hilliard, Apr 28 2006
a(11) from Cino Hilliard, Oct 03 2006
a(12)-a(13) from Hiroaki Yamanouchi, Jul 06 2014
a(11) corrected by Marc Deleglise, Apr 03 2016
a(14)-a(17) from Marc Deleglise, Apr 03 2016
a(18)-a(20) from Kim Walisch, Jun 05 2016
a(21) from Kim Walisch, Jun 11 2016
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