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 14 results. Next

A127333 Numbers that are the sum of 6 consecutive primes.

Original entry on oeis.org

41, 56, 72, 90, 112, 132, 156, 180, 204, 228, 252, 280, 304, 330, 358, 384, 410, 434, 462, 492, 522, 552, 580, 606, 630, 660, 690, 724, 756, 796, 834, 864, 896, 926, 960, 990, 1020, 1054, 1084, 1114, 1140, 1172, 1214, 1250, 1286, 1322, 1362, 1392, 1420
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

a(n) is the absolute value of coefficient of x^5 of the polynomial Prod_{j=0,5}(x-prime(n+j)) of degree 6; the zeros of this polynomial are prime(n), ..., prime(n+5).

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..5] ]: n in [1..80] ]; /* Vincenzo Librandi, Apr 03 2011 */
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 5}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],6,1] (* Harvey P. Dale, Mar 12 2015 *)
  • PARI
    {m=50;k=6;for(n=0,m-1,print1(a=sum(j=1,k,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 12 2007
    
  • PARI
    {m=50;k=6;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 12 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 12 2007

A127335 Numbers that are the sum of 8 successive primes.

Original entry on oeis.org

77, 98, 124, 150, 180, 210, 240, 270, 304, 340, 372, 408, 442, 474, 510, 546, 582, 620, 660, 696, 732, 768, 802, 846, 888, 928, 966, 1012, 1056, 1104, 1154, 1194, 1236, 1278, 1320, 1362, 1404, 1444, 1480, 1524, 1574, 1622, 1670, 1712, 1758, 1802, 1854, 1900
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..7] ]: n in [1..90] ]; // Vincenzo Librandi, Apr 03 2011
  • Maple
    S:= [0,op(ListTools:-PartialSums(select(isprime, [2,seq(i,i=3..1000,2)])))]:
    S[9..-1]-S[1..-9]; # Robert Israel, Nov 27 2017
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 7}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],8,1] (* Harvey P. Dale, Sep 10 2019 *)
  • PARI
    {m=48;k=8;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=48;k=8;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    a(n)=my(p=prime(n));p+sum(i=2,8,p=nextprime(p+1)) \\ Charles R Greathouse IV, Apr 19 2015
    

Formula

a(n) ~ 8n log n. - Charles R Greathouse IV, Apr 19 2015

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127336 Numbers that are the sum of 9 consecutive primes.

Original entry on oeis.org

100, 127, 155, 187, 221, 253, 287, 323, 363, 401, 439, 479, 515, 553, 593, 635, 679, 721, 763, 803, 841, 881, 929, 977, 1025, 1067, 1115, 1163, 1213, 1267, 1321, 1367, 1415, 1459, 1511, 1555, 1601, 1643, 1691, 1747, 1801, 1851, 1903, 1951, 1999, 2053
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..8] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Mathematica
    A127336 = {}; Do[AppendTo[A127336, Sum[Prime[x + n], {n, 0, 8}]], {x, 1, 50}]; A127336 (* Artur Jasinski, Jan 11 2007 *)
    Table[Plus@@Prime[Range[n, n + 8]], {n, 50}] (* Alonso del Arte, Aug 27 2013 *)
    Total/@Partition[Prime[Range[60]],9,1] (* Harvey P. Dale, Nov 18 2020 *)
  • PARI
    {m=46;k=9;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    {m=46;k=9;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(x): return sum([prime(x + n) for n in range(9)])
    print([a(i) for i in range(1, 50)]) # Indranil Ghosh, Mar 18 2017

Formula

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

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127338 Numbers that are the sum of 11 consecutive primes.

Original entry on oeis.org

160, 195, 233, 271, 311, 353, 399, 443, 491, 539, 583, 631, 677, 725, 779, 833, 883, 931, 979, 1025, 1081, 1139, 1197, 1253, 1313, 1367, 1423, 1483, 1543, 1607, 1673, 1727, 1787, 1843, 1901, 1951, 2011, 2077, 2141, 2203, 2263, 2323, 2383, 2443, 2507
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..10] ]: n in [1..70] ]; // Vincenzo Librandi, Apr 03 2011
  • Mathematica
    f[n_] := Sum[Prime[n + i], {i, 0, 10}]; Array[f, 45]
    Plus @@@ Partition[ Prime@ Range@ 55, 11, 1] (* Robert G. Wilson v, Jan 13 2011 *)
  • PARI
    {m=45;k=11;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=45;k=11;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127334 Numbers that are the sum of 7 consecutive primes.

Original entry on oeis.org

58, 75, 95, 119, 143, 169, 197, 223, 251, 281, 311, 341, 371, 401, 431, 463, 493, 523, 559, 593, 625, 659, 689, 719, 757, 791, 827, 863, 905, 947, 991, 1027, 1063, 1099, 1139, 1171, 1211, 1247, 1281, 1313, 1351, 1395, 1441, 1479, 1519, 1561, 1603, 1643
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

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

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);; List([0..50],n->Sum([1+n..7+n],i->P[i])); # Muniru A Asiru, Apr 16 2018
  • Magma
    [&+[ NthPrime(n+k): k in [0..6] ]: n in [1..70] ]; // Vincenzo Librandi, Apr 03 2011
    
  • Maple
    seq(add(ithprime(i),i=n..6+n),n=1..50); # Muniru A Asiru, Apr 16 2018
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 6}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],7,1] (* Harvey P. Dale, May 14 2023 *)
  • PARI
    {m=48;k=7;for(n=0,m-1,print1(a=sum(j=1,k,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=48;k=7;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(x): return sum(prime(x + n) for n in range(7))
    print([a(i) for i in range(1, 50)]) # Indranil Ghosh, Mar 18 2017
    
  • Sage
    BB = primes_first_n(62)
    L = []
    for i in range(55):
        L.append(sum(BB[i+j] for j in range(7)))
    L
    # Zerinvary Lajos, May 14 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127339 Numbers that are the sum of 12 consecutive primes.

Original entry on oeis.org

197, 236, 276, 318, 364, 412, 460, 510, 562, 612, 662, 714, 766, 822, 880, 936, 990, 1040, 1092, 1152, 1212, 1276, 1336, 1402, 1464, 1524, 1586, 1650, 1716, 1786, 1854, 1918, 1980, 2040, 2100, 2162, 2234, 2304, 2370, 2436, 2502, 2564, 2634, 2700, 2770
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    [&+[ NthPrime(n+k): k in [0..11] ]: n in [1..100] ]; // Vincenzo Librandi, Apr 03 2011
  • Mathematica
    a = {}; Do[AppendTo[a, Sum[Prime[x + n], {n, 0, 11}]], {x, 1, 50}]; a
    Total/@Partition[Prime[Range[60]],12,1] (* Harvey P. Dale, May 05 2018 *)
  • PARI
    {m=45;k=12;for(n=1,m,print1(a=sum(j=0,k-1,prime(n+j)),","))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=45;k=12;for(n=1,m,print1(abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1)),","))} \\ Klaus Brockhaus, Jan 13 2007
    

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A123096 Prime arithmetic mean of ten consecutive primes.

Original entry on oeis.org

727, 761, 1663, 1783, 1811, 1913, 2693, 2969, 3229, 3433, 4073, 4091, 4421, 4547, 4673, 4903, 5099, 5801, 5927, 6359, 7537, 7727, 7927, 8093, 8111, 8293, 9041, 9829, 11177, 11239, 11447, 12671, 14771, 14779, 14929, 15131, 16421, 16477, 16619
Offset: 1

Views

Author

Zak Seidov, Sep 27 2006

Keywords

Comments

Corresponding indices of first primes are: 125, 130, 257, 272, 275, 288, 387, 423, 452, 477, 557, 559, 597, 612, 627, 651, 677, 757, 774, 824, 951, 976, 997, 1013, 1015, 1036, 1119, 1208, 1349, 1355, 1376, 1509, 1726, 1727, 1744, 1763, 1899, 1905, 1918, 1979

Examples

			(prime(125)+...+prime(134))/10 = 727, where prime(n) is the n-th prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Mean/@Partition[Prime[Range[2000]],10,1],PrimeQ] (* Harvey P. Dale, Jul 19 2011 *)

Formula

A000040 INTERSECT A218114. - R. J. Mathar, Apr 24 2023

A127492 Indices m of primes such that Sum_{k=0..2, k

Original entry on oeis.org

2, 10, 17, 49, 71, 72, 75, 145, 161, 167, 170, 184, 244, 250, 257, 266, 267, 282, 286, 301, 307, 325, 343, 391, 405, 429, 450, 537, 556, 561, 584, 685, 710, 743, 790, 835, 861, 904, 928, 953
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Let p_0 .. p_4 be five consecutive primes, starting with the m-th prime. The index m is in the sequence if the absolute value [x^0] of the polynomial (x-p_0)*[(x-p_1)*(x-p_2) + (x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_1)*[(x-p_2)*(x-p_3) + (x-p_3)*(x-p_4)] + (x-p_2)*(x-p_3)*(x-p_4) is two times a prime. The correspondence with A127491: the coefficient [x^2] of the polynomial (x-p_0)*(x-p_1)*..*(x-p_4) is the sum of 10 products of a set of 3 out of the 5 primes. Here the sum is restricted to the 6 products where the two largest of the 3 primes are consecutive. - R. J. Mathar, Apr 23 2023

Crossrefs

Programs

  • Maple
    isA127492 := proc(k)
        local x,j ;
        (x-ithprime(k))* mul( x-ithprime(k+j),j=1..2)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=2..3)
        +(x-ithprime(k+1))* mul( x-ithprime(k+j),j=3..4)
        +(x-ithprime(k+2))* mul( x-ithprime(k+j),j=3..4) ;
        p := abs(coeff(expand(%/2),x,0)) ;
        if type(p,'integer') then
            isprime(p) ;
        else
            false ;
        end if ;
    end proc:
    for k from 1 to 900 do
        if isA127492(k) then
            printf("%a,",k) ;
        end if ;
    end do: # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2] + Prime[x] Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3] + Prime[x + 1] Prime[x + 3]Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])/2], AppendTo[a, x]], {x, 1, 1000}]; a
    prQ[{a_,b_,c_,d_,e_}]:=PrimeQ[(a b c+a c d+a d e+b c d+b d e+c d e)/2]; PrimePi/@Select[ Partition[ Prime[Range[1000]],5,1],prQ][[;;,1]] (* Harvey P. Dale, Apr 21 2023 *)

Extensions

Definition simplified by R. J. Mathar, Apr 23 2023
Edited by Jon E. Schoenfield, Jul 23 2023

A218114 Integer arithmetic means of 10 consecutive primes.

Original entry on oeis.org

30, 34, 51, 78, 87, 106, 132, 165, 180, 203, 225, 231, 248, 253, 305, 312, 375, 381, 488, 502, 510, 588, 633, 690, 727, 734, 754, 761, 988, 1038, 1070, 1089, 1110, 1140, 1183, 1218, 1299, 1336, 1368, 1408, 1416, 1431, 1437, 1449, 1466, 1504, 1525, 1600, 1632
Offset: 1

Views

Author

Zak Seidov, Oct 21 2012

Keywords

Comments

It is obvious that the terms occur in increasing order, since the mean increases by (prime(n)-prime(n-10))/10 when going to the 10 primes which include prime(n) as largest term. However, differences of 6, as e.g. between the terms a(n)=9813497 and a(n+1)=9813503 (= average of prime(653096) through prime(653105)), seem to occur infinitely often. Is this true, and is this the smallest such step? - M. F. Hasler, Oct 21 2012
Also difference 5 seems to occur infinitely often. For first 200000 differences, values 5..10 occur 5, 57, 123, 400, 1755, 1439 times. Apparently all differences >4 occur infinitely often. - Zak Seidov, May 22 2015

Examples

			a(1) is derived from (prime(6)+...+prime(15))/10 = (13+ 17+ 19+ 23+ 29+ 31+ 37+ 41+ 43+ 47)/10=30.
		

Crossrefs

Cf. A000040, A123096 (subsequence of primes), A127337.

Programs

  • Maple
    Psums:= ListTools:-PartialSums(select(isprime,[2,(2*i+1 $ i=1..10^4)])):
    select(type, (Psums[11..-1] - Psums[1..-11])/10, integer); # Robert Israel, May 22 2015
  • Mathematica
    Select[Total /@ Partition[Prime@ Range@ 263, 10, 1]/10, IntegerQ] (* Michael De Vlieger, May 22 2015 *)
    Select[Mean/@Partition[Prime[Range[300]],10,1],IntegerQ] (* Harvey P. Dale, Aug 28 2021 *)
  • PARI
    lista(nn) = {for (n=1, nn, my(s = sum(k=0, 9, prime(n+k))/10); if (type(s) == "t_INT", print1(s, ", ")););} \\ Michel Marcus, May 23 2015

A283873 Smallest number that is the sum of n successive primes and also the sum of n successive semiprimes, n > 1.

Original entry on oeis.org

24, 749, 48, 311, 690, 251, 2706, 2773, 6504, 1081, 2162, 1753, 11356, 6223, 1392, 2303, 9838, 637, 14510, 1995, 3154, 21459, 72960, 5691, 8140, 1475, 2350, 3647, 1593, 7607, 55074, 2719, 9852, 12143, 106562, 12615, 9036, 19883, 15438, 28369, 8560, 8415, 3831
Offset: 2

Views

Author

Zak Seidov, Mar 17 2017

Keywords

Comments

The sequence is non-monotone.

Examples

			a(2) = 24 = A000040(5) + A000040(6) = 11 + 13 = A001358(4) + A001358(5) = 10 + 14,
a(3) = 749 = A000040(53) + A000040(54) + A000040(55) = 241 + 251 + 257 = A001358(79) + A001358(80) + A001358(81) = 247 + 249 + 253.
		

Crossrefs

Cf. A000040 Primes, A001358 Semiprimes, A118717 Sum of two consecutive semiprimes.
Sum of k consecutive primes: A001043 k=2, A034961 k=3, A034963 k=4, A034964 k=5, A127333 k=6, A127334 k=7, A127335 k=8, A127336 k=9, A127337 k=10, A127338 k=11, A127339 k=12.

Programs

  • Maple
    issp:= n-> is(not isprime(n) and numtheory[bigomega](n)=2):
    ithsp:= proc(n) option remember; local k; for k from 1+
            `if`(n=1, 1, ithsp(n-1)) while not issp(k) do od; k
            end:
    ps:= proc(i, j) option remember;
           ithprime(j)+`if`(i=j, 0, ps(i, j-1))
         end:
    ss:= proc(i, j) option remember;
           ithsp(j)+`if`(i=j, 0, ss(i, j-1))
         end:
    a:= proc(n) option remember; local i, j, k, l, p, s;
          i, j, k, l, p, s:= 1, n, 1, n, ps(1, n), ss(1, n);
          do if p=s then return p
           elif pAlois P. Heinz, Mar 24 2017
  • Mathematica
    sp=Select[Range[4,100000],2==PrimeOmega[#]&];pr=Prime[Range[PrimePi[Max[sp]]]];
    Table[Intersection[(Total/@Partition[pr,k,1]),Total/@Partition[sp,k,1]][[1]],{k,2,100}]

Extensions

More terms from Alois P. Heinz, Mar 24 2017
Showing 1-10 of 14 results. Next