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

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

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

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

A281824 Numbers that are the sum of 6 consecutive semiprimes.

Original entry on oeis.org

58, 75, 91, 107, 123, 142, 161, 175, 191, 205, 225, 241, 258, 278, 297, 316, 332, 348, 366, 385, 405, 429, 452, 473, 491, 508, 524, 536, 546, 566, 590, 614, 639, 664, 690, 706, 718, 732, 747, 762, 782, 802, 822, 838, 851, 872, 889, 906, 924, 945, 968, 990
Offset: 1

Views

Author

Zak Seidov, Jan 31 2017

Keywords

Comments

Semiprime analog of A127333. First terms that are also in A127333: 690, 990, 1172, 1250, 1286, 2288, 4798, 5064.

Crossrefs

Programs

  • Mathematica
    Total /@ Partition[Select[Range[4, 200], 2 == PrimeOmega[#] &], 6, 1]
  • PARI
    do(n)=my(v=List([58]),u=List(),t=58); forprime(p=2,n\2, forprime(q=2,min(p,n\p), listput(u,p*q))); u=Set(u); for(i=7,#u, listput(v, t+=u[i]-u[i-6])); Set(v) \\ Charles R Greathouse IV, Jan 31 2017

Formula

a(n) ~ 6n log n/log log n. - Charles R Greathouse IV, Jan 31 2017

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

A127493 Indices k such that the coefficient [x^1] of the polynomial Product_{j=0..4} (x-prime(k+j)) is prime.

Original entry on oeis.org

1, 5, 8, 9, 22, 29, 45, 49, 60, 69, 87, 89, 90, 107, 114, 124, 125, 131, 134, 138, 145, 156, 171, 183, 188, 191, 203, 204, 207, 212, 219, 255, 261, 290, 298, 303, 329, 330, 343, 344, 349, 354, 378, 397, 398, 400, 403, 454, 456, 466, 474, 515, 549, 560, 570, 578
Offset: 1

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

A fifth-order polynomial with 5 roots which are the five consecutive primes from prime(k) onward is defined by Product_{j=0..4} (x-prime(k+j)). The sequence is a catalog of the cases where the coefficient of its linear term is prime.
Indices k such that e4(prime(k), prime(k+1), ..., prime(k+4)) is prime, where e4 is the elementary symmetric polynomial summing all products of four variables. - Charles R Greathouse IV, Jun 15 2015

Examples

			For k=2, the polynomial is (x-3)*(x-5)*(x-7)*(x-11)*(x-13) = x^5-39*x^4+574*x^3-3954*x^2+12673*x-15015, where 12673 is not prime, so k=2 is not in the sequence.
For k=5, the polynomial is x^5-83*x^4+2710*x^3-43490*x^2+342889*x-1062347, where 342889 is prime, so k=5 is in the sequence.
		

Programs

  • Maple
    isA127493 := proc(k)
        local x,j ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        isprime(coeff(%,x,1)) ;
    end proc:
    A127493 := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA127493(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A127493(n),n=1..60) ; # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 2]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3]Prime[x + 4])], AppendTo[a, x]], {x, 1, 1000}]; a
  • PARI
    e4(v)=sum(i=1,#v-3, v[i]*sum(j=i+1,#v-2, v[j]*sum(k=j+1,#v-1, v[k]*vecsum(v[k+1..#v]))))
    pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v
    is(n,p=prime(n))=isprime(e4(pr(p,5)))
    v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 15 2015

Extensions

Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009
Showing 1-10 of 13 results. Next