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-10 of 47 results. Next

A034961 Sums of three consecutive primes.

Original entry on oeis.org

10, 15, 23, 31, 41, 49, 59, 71, 83, 97, 109, 121, 131, 143, 159, 173, 187, 199, 211, 223, 235, 251, 269, 287, 301, 311, 319, 329, 349, 371, 395, 407, 425, 439, 457, 471, 487, 503, 519, 533, 551, 565, 581, 589, 607, 633, 661, 679, 689, 701, 713, 731, 749, 771
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

For prime terms see A034962. - Zak Seidov, Feb 17 2011

Examples

			a(1) = 10 = 2 + 3 + 5.
a(42) = 565 = 181 + 191 + 193.
		

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..2] ]: n in [1..50] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Mathematica
    Plus @@@ Partition[ Prime[ Range[60]], 3, 1] (* Robert G. Wilson v, Feb 11 2005 *)
    3 MovingAverage[Prime[Range[60]], {1, 1, 1}] (* Jean-François Alcover, Nov 12 2018 *)
  • PARI
    a(n)=my(p=prime(n),q=nextprime(p+1)); p+q+nextprime(q+1) \\ Charles R Greathouse IV, Jul 01 2013
    
  • PARI
    is(n)=my(p=precprime(n\3),q=nextprime(n\3+1),r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r) \\ Charles R Greathouse IV, Jul 05 2017
    
  • Python
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        p, q, r = 2, 3, 5
        while True:
            yield p + q + r
            p, q, r = q, r, nextprime(r)
    print(list(islice(agen(), 54))) # Michael S. Branicky, Dec 27 2022
  • Sage
    BB = primes_first_n(57)
    L = []
    for i in range(55):
        L.append(BB[i]+BB[i+1]+BB[i+2])
    L # Zerinvary Lajos, May 14 2007
    

Formula

a(n) = Sum_{k=0..2} A000040(n+k). - Omar E. Pol, Feb 28 2020
a(n) = A001043(n) + A000040(n+2). - R. J. Mathar, May 25 2020

A133529 Sum of squares of three consecutive primes.

Original entry on oeis.org

38, 83, 195, 339, 579, 819, 1179, 1731, 2331, 3171, 4011, 4899, 5739, 6867, 8499, 10011, 11691, 13251, 14859, 16611, 18459, 21051, 24219, 27531, 30219, 32259, 33939, 36099, 40779, 46059, 52059, 55251, 60291, 64323, 69651, 74019, 79107, 84387, 89859, 94731, 101283
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Comments

It is easy to see that all terms > 83 are divisible by 3.
Likewise all terms except 38 are congruent to 3 (mod 8). - Franklin T. Adams-Watters, Jun 17 2015

Examples

			a(1)=38 because 2^2 + 3^2 + 5^2 = 38.
		

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+i)^2 :  i in [0..2]] : n in [1..20]]; // K. D. Bajpai, Jun 17 2015
  • Mathematica
    a = 2; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a, {n, 1, 100}]
    Total/@Partition[Prime[Range[50]]^2, 3, 1] (* Vincenzo Librandi, Jun 18 2015 *)
  • PARI
    for( n= 1, 100,  k= sum(i=n, n+2, prime(i)^2) ; print1(k, ", ")) \\ K. D. Bajpai, Jun 17 2015
    

Formula

a(n) = A069484(n) + A001248(n+2). - Michel Marcus, Nov 08 2013

Extensions

a(38)-a(41) from K. D. Bajpai, Jun 18 2015

A133524 Sum of squares of four consecutive primes.

Original entry on oeis.org

87, 204, 364, 628, 940, 1348, 2020, 2692, 3700, 4852, 5860, 7108, 8548, 10348, 12220, 14500, 16732, 18580, 21100, 23500, 26380, 30460, 34420, 38140, 41668, 44140, 46708, 52228, 57940, 64828, 71380, 77452, 83092, 88972, 96220, 101908, 109036
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=87 because 2^2+3^2+5^2+7^2=87.
		

Crossrefs

Cf. A034963.

Programs

  • Mathematica
    a = 2; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a, {n, 1, 100}]
    Total/@Partition[Prime[Range[40]]^2,4,1] (* Harvey P. Dale, Dec 09 2018 *)
  • PARI
    a(n)=sum(i=n, n+3, prime(i)^2) \\ Charles R Greathouse IV, Apr 29 2015

Formula

a(n) = A133529(n) + A001248(n+3). - Michel Marcus, Nov 08 2013
a(n) ~ 4n^2 log^2 n. - Charles R Greathouse IV, Apr 29 2015

A133526 Sum of fourth powers of four consecutive primes.

Original entry on oeis.org

3123, 17748, 46228, 129124, 257044, 522244, 1200964, 2040964, 3784804, 6330724, 9042244, 12998404, 19014724, 28306324, 38733364, 54004804, 71526004, 87806884, 112911124, 140218324, 177548884, 237679924, 302790244, 367882804, 436220164
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=3123 because 2^4+3^4+5^4+7^4=3123.
		

Crossrefs

Programs

  • Mathematica
    a = 4; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a, {n, 1, 100}]
    Total/@Partition[Prime[Range[30]]^4,4,1] (* Harvey P. Dale, Sep 09 2014 *)
  • PARI
    a(n)=sum(i=n,n+3,prime(i)^4) \\ Charles R Greathouse IV, Apr 29 2015

Formula

a(n) = A133531(n) + A030514(n+3). - Michel Marcus, Nov 08 2013
a(n) ~ 4n^4 log^4 n. - Charles R Greathouse IV, Apr 29 2015

A133530 Sum of third powers of three consecutive primes.

Original entry on oeis.org

160, 495, 1799, 3871, 8441, 13969, 23939, 43415, 66347, 104833, 149365, 199081, 252251, 332207, 458079, 581237, 733123, 885655, 1047691, 1239967, 1453843, 1769795, 2189429, 2647943, 3035701, 3348071, 3612799, 3962969, 4786309
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=160 because 2^3+3^3+5^3=160.
		

Crossrefs

Programs

  • Mathematica
    a = 3; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a, {n, 1, 100}]

Formula

a(n) = A133534(n) + A030078(n+2). - Michel Marcus, Nov 08 2013

A133525 Sum of third powers of four consecutive primes.

Original entry on oeis.org

503, 1826, 3996, 8784, 15300, 26136, 48328, 73206, 117000, 173754, 228872, 302904, 401128, 537586, 685060, 882000, 1091034, 1274672, 1540730, 1811754, 2158812, 2682468, 3219730, 3740670, 4260744, 4643100, 5055696, 6011352, 7034400
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=503 because 2^3+3^3+5^3+7^3=503.
		

Crossrefs

Programs

  • Maple
    N:= 50: # for a(1)..a(N)
    P3:= [0,seq(ithprime(i)^3,i=1..N+3)]:
    S:= ListTools:-PartialSums(P3):
    seq(S[i+4]-S[i],i=1..N); # Robert Israel, Jan 01 2024
  • Mathematica
    a = 3; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a, {n, 1, 100}]
    Total/@Partition[Prime[Range[40]]^3,4,1] (* Harvey P. Dale, Jan 06 2019 *)

Formula

a(n) = A133530(n) + A030078(n+3). - Michel Marcus, Nov 08 2013

A133528 Sum of sixth powers of four consecutive primes.

Original entry on oeis.org

134067, 1905564, 6731644, 30853588, 77781820, 224046148, 814042660, 1677408772, 4196089300, 8798157652, 14524697380, 24416409028, 44015043748, 81445473148, 126644484460, 206323651300, 312259574092, 421413266740
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=134067 because 2^6+3^6+5^6+7^6=134067.
		

Crossrefs

Programs

  • Mathematica
    a = 6; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a, {n, 1, 100}]

Formula

a(n) = A133533(n) + A030516(n+3). - Michel Marcus, Nov 08 2013

A133527 Sum of fifth powers of four consecutive primes.

Original entry on oeis.org

20207, 181226, 552276, 1969008, 4428300, 10703592, 30843448, 58052742, 124920600, 234340458, 360837752, 561553608, 910405144, 1509473242, 2207061100, 3327841200, 4713875058, 6072022352, 8304482450, 10893397986
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=20207 because 2^5+3^5+5^5+7^5=20207.
		

Crossrefs

Programs

  • Mathematica
    a = 5; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a + Prime[n + 3]^a, {n, 1, 100}]

Formula

a(n) = A133532(n) + A050997(n+3). - Michel Marcus, Nov 08 2013

A133531 Sum of fourth powers of three consecutive primes.

Original entry on oeis.org

722, 3107, 17667, 45603, 126723, 242403, 493683, 1117443, 1910643, 3504963, 5623443, 8118723, 11124243, 16188963, 24887523, 33853683, 46114323, 59408643, 73961043, 92760003, 114806643, 149150643, 198729843, 255331923, 305140563
Offset: 1

Views

Author

Artur Jasinski, Sep 14 2007

Keywords

Examples

			a(1)=722 because 2^4+3^4+5^4=722.
		

Crossrefs

Programs

  • Mathematica
    a = 4; Table[Prime[n]^a + Prime[n + 1]^a + Prime[n + 2]^a, {n, 1, 100}]

Formula

a(n) = A133535(n) + A030514(n+2). - Michel Marcus, Nov 09 2013

A127337 Numbers that are the sum of 10 consecutive primes.

Original entry on oeis.org

129, 158, 192, 228, 264, 300, 340, 382, 424, 468, 510, 552, 594, 636, 682, 732, 780, 824, 870, 912, 954, 1008, 1060, 1114, 1164, 1216, 1266, 1320, 1376, 1434, 1494, 1546, 1596, 1650, 1704, 1752, 1800, 1854, 1914, 1974, 2030, 2084, 2142, 2192, 2250, 2310, 2374
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) is the absolute value of coefficient of x^9 of the polynomial Product_{j=0..9} (x - prime(n+j)) of degree 10; the roots of this polynomial are prime(n), ..., prime(n+9).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..9] ]: n in [1..90] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Maple
    A127337 := proc(n)
        local i ;
        add(ithprime(n+i),i=0..9) ;
    end proc:
    seq(A127337(n),n=1..30) ; # R. J. Mathar, Apr 24 2023
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 9}]], {x, 1, 50}]; a
    Table[Plus@@Prime[Range[n, n + 9]], {n, 50}] (* Alonso del Arte, Feb 15 2011 *)
    ListConvolve[ConstantArray[1, 10], Prime[Range[50]]]
    Total/@Partition[Prime[Range[60]],10,1] (* Harvey P. Dale, Jan 31 2013 *)
  • PARI
    {m=46;k=10;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=46;k=10;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • Python
    from sympy import prime
    def a(n): return sum(prime(n + i) for i in range(10))
    print([a(n) for n in range(1, 48)]) # Michael S. Branicky, Dec 09 2021
    
  • Python
    # faster version for generating initial segment of sequence
    from sympy import nextprime
    def aupton(terms):
        alst, plst = [], [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
        for n in range(terms):
            alst.append(sum(plst))
            plst = plst[1:] + [nextprime(plst[-1])]
        return alst
    print(aupton(47)) # Michael S. Branicky, Dec 09 2021

Formula

a(n) = A127336(n)+A000040(n+9). - R. J. Mathar, Apr 24 2023

Extensions

Edited by Klaus Brockhaus, Jan 13 2007
Showing 1-10 of 47 results. Next