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.

Showing 1-5 of 5 results.

A099825 Sum of the first 2^n primes.

Original entry on oeis.org

2, 5, 17, 77, 381, 1851, 8893, 41741, 191755, 868151, 3875933, 17120309, 74950547, 325590115, 1405167561, 6029676711, 25750781177, 109495928099, 463852117169, 1958476902435, 8244703036797, 34615624751259, 144991244981985, 605994279458465, 2527803622205465
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[0] = 2; f[n_] := f[n] = Block[{k = 0, mx = 2^n/2, np = Prime[2^n/2], s = f[n - 1]}, While[k < mx, k++; np = NextPrim@np; s = s + np]; s]; Table[ f@n, {n, 0, 23}] (* Robert G. Wilson v, Aug 24 2006 *)
    Module[{nn=22,ap},ap=Accumulate[Prime[Range[2^nn]]];Table[ap[[2^n]],{n,0,nn}]] (* Harvey P. Dale, Apr 12 2017 *)
  • PARI
    a(n)=my(s); n=2^n; forprime(p=2,, s+=p; if(n--==0, return(s))) \\ Charles R Greathouse IV, Feb 16 2017 \\ corrected by David A. Corneth, Aug 05 2025

Formula

a(n) = A007504(A000079(n)). - Amiram Eldar, Jul 01 2024

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

A113633 Sum of the first 5^n primes.

Original entry on oeis.org

2, 28, 1060, 39612, 1336090, 42157238, 1271530648, 37178373556, 1062895088910, 29878892909030, 828999068943506, 22762324818835316, 619715756464336328, 16753554900339748756, 450233110894196298638, 12038074430656287496566, 320451759639384414082274, 8497567719126134980044214
Offset: 0

Views

Author

Cino Hilliard, Jan 15 2006

Keywords

Comments

Using the program at the link, computation of the next term, a(15), would require generating a list of the first 31 * 10^9 8-byte primes (file size: 250 GB). Given runtimes of 0.06, 0.13, 0.63, 7.5, 64.6, 375.38, and 2092.56 seconds on a 2.53 GHz P4 processor for a(8) through a(14), respectively, the program in the link will sum the first 5^15 primes in 3.5 hours. [Comment reworded by Jon E. Schoenfield, Aug 01 2015]

Examples

			The first 5^1 primes add up to 28.
		

Crossrefs

Programs

  • Mathematica
    t = {}; c = 1; k = 3; s = 2; Do[ While[c < 5^n, If[PrimeQ[k], c++; s += k]; k += 2]; Print@s; AppendTo[t, s], {n, 0, 10}]; t (* Robert G. Wilson v, Jan 17 2006 *)

Formula

a(n) = A007504(A000351(n)). - Michel Marcus, Aug 01 2015

Extensions

a(15) onwards from Amiram Eldar, Jul 01 2024

A113634 Sum of the first 6^n primes.

Original entry on oeis.org

2, 41, 2427, 132059, 6426919, 291627051, 12646104721, 531741567755, 21868328382007, 884528298065271, 35319715358896709, 1395934334687210019, 54710988941767714851, 2129404515458094306737, 82391816104703313499231, 3171892875586735205701385, 121577571158289668158700601
Offset: 0

Views

Author

Cino Hilliard, Jan 15 2006

Keywords

Examples

			The first 6^1 primes add up to 41.
		

Crossrefs

Programs

  • Mathematica
    t = {}; c = 1; k = 3; s = 2; Do[While[c < 6^n, If[PrimeQ@k, c++; s += k]; k += 2]; Print@s; AppendTo[t, s], {n, 0, 9}]; t (* Robert G. Wilson v, Jan 17 2006 *)

Formula

a(n) = A007504(6^n).

Extensions

a(13)-a(16) from Amiram Eldar, Jul 01 2024

A113635 Sum of the first 7^n primes.

Original entry on oeis.org

2, 58, 4888, 363288, 24047406, 1482656786, 87401659166, 4997438572618, 279544493456056, 15382405126365576, 835737977869494888, 44947274043643171988, 2397349106561086277820, 126986150948361831547964, 6687136917574958175921116, 350384258762032443770716600
Offset: 0

Views

Author

Cino Hilliard, Jan 15 2006

Keywords

Examples

			The first 7^1 primes add up to 58.
		

Crossrefs

Programs

  • Mathematica
    t = {}; c = 1; k = 3; s = 2; Do[While[c < 7^n, If[ PrimeQ@k, c++; s += k]; k += 2]; Print@s; AppendTo[t, s], {n, 0, 9}]; t (* Robert G. Wilson v, Jan 17 2006 *)
    Table[Total[Prime[Range[7^n]]],{n,0,7}] (* The program generates the first 8 terms of the sequence. *) (* Harvey P. Dale, Jan 18 2024 *)

Formula

a(n) = A007504(A000420(n)). - Michel Marcus, Aug 01 2015

Extensions

a(12) onwards from Amiram Eldar, Jul 01 2024
Showing 1-5 of 5 results.