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-9 of 9 results.

A113617 Primes in the sums of the first 2^n primes or primes in A099825.

Original entry on oeis.org

2, 5, 17, 8893, 868151, 3875933, 219554912086470964379, 63036368490471985096643, 26151660747268050131008657684404431
Offset: 1

Views

Author

Cino Hilliard, Jan 14 2006

Keywords

Comments

The programs in the link require the construction of a wall to wall binary file containing the first 10.6 * 10^9 primes.

Examples

			Sum of first 2^32 primes = 219554912086470964379 which is prime.
		

Crossrefs

Formula

a(n) = A099825(A121248(n)). - Amiram Eldar, Jul 01 2024

Extensions

Offset corrected and a(8)-a(9) added by 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

A099826 Sum of the first 3^n primes.

Original entry on oeis.org

2, 10, 100, 1264, 15116, 171148, 1864190, 19697700, 203534530, 2067129306, 20706364528, 205144046742, 2014349179358, 19632546354498, 190150622868298, 1831906588192414, 17567504017456404, 167794196312059488, 1597037992049539274
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]; k = p = 1; s = 0; Do[ While[p = NextPrim[p]; s = s + p; k < 10^n, k++ ]; k++; Print[s], {n, 0, 16}]

Formula

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

Extensions

More terms from Cino Hilliard, Jan 14 2006

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

A121248 Numbers k such that the sum of the first 2^k primes is a prime.

Original entry on oeis.org

0, 1, 2, 6, 9, 10, 32, 36, 55
Offset: 1

Views

Author

Alexander Adamchuk, Aug 22 2006

Keywords

Comments

Corresponding primes in the sums of the first 2^n primes or primes in A099825[n] are given in A113617[n] = {2,5,17,8893,868151,3875933,219554912086470964379,...}.

Crossrefs

Programs

  • Mathematica
    Do[f=Sum[Prime[k],{k,1,2^n}]; If[PrimeQ[f],Print[{n,f}]],{n,0,32}]

Formula

A099825(a(n)) = A113617(n). - Amiram Eldar, Jul 01 2024

Extensions

Edited by Robert G. Wilson v, Aug 26 2006
a(7)-a(9) from Amiram Eldar, Jul 01 2024

A131590 Sum of the squares of the first 2^n primes.

Original entry on oeis.org

4, 13, 87, 1027, 13275, 155995, 1789395, 19523155, 204330315, 2081006083, 20605602003, 199966727443, 1908356153955, 17942429101363, 166591116531123, 1529578004981731, 13917470067182067, 125565110929591171, 1124685106917162579, 10009134886727192611
Offset: 0

Views

Author

Cino Hilliard, Aug 30 2007

Keywords

Examples

			The sum of the squares of the first 2^2 primes is a(2) = 4 + 9 + 25 + 49 = 87.
		

Crossrefs

Programs

  • Mathematica
    Array[Total[Prime[Range[2^#]]^2]&,20,0] (* James C. McMahon, Feb 25 2025 *)
  • PARI
    sumprimesq(n,b) = { local(x,y,s,a); for(y=0,n, s=0; for(x=1,b^y, s+=prime(x)^2; ); print1(s","); ) }
    
  • PARI
    lista(pmax) = {my(s = 0, k = 0, pow = 1); forprime(p = 1, pmax, k++; s += p^2; if(k == pow, print1(s, ", "); pow *= 2));} \\ Amiram Eldar, Jul 06 2024
    
  • Python
    from sympy import sieve, prime
    def a(n): return sum(p*p for p in sieve.primerange(1, prime(2**n)+1))
    print([a(n) for n in range(20)]) # Michael S. Branicky, Apr 13 2021

Formula

a(n) = A024450(2^n). - Amiram Eldar, Jul 06 2024

Extensions

a(18) and beyond from Michael S. Branicky, Apr 13 2021

A104190 Sums of primes between successive powers of two.

Original entry on oeis.org

2, 8, 48, 270, 1392, 6862, 32440, 149114, 674344, 3003292, 13234674, 57809228, 250594424, 1079480960, 4624303560, 19720668918, 83744226026, 354354250476, 1494620712320, 6286217598392, 26370903868480, 110375582988186, 461002956906910, 1921809181446898, 7997638730622268
Offset: 0

Views

Author

Roger L. Bagula, Mar 12 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a = Table[Sum[Prime[i], {i, 2^n, 2^(n + 1) - 1}], {n, 0, 24}]

Formula

a(n) = Sum_{i=2^n..2^(n+1)-1} prime(i).
a(n) = (A099825(n+1) - A099825(n)) - (A033844(n+1) - A033844(n)). - Amiram Eldar, Jun 04 2025

Extensions

a(20)-a(24) from Amiram Eldar, Jun 04 2025
Showing 1-9 of 9 results.