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

A215991 Primes that are the sum of 25 consecutive primes.

Original entry on oeis.org

1259, 1361, 2027, 2267, 2633, 3137, 3389, 4057, 5153, 6257, 6553, 7013, 7451, 7901, 9907, 10499, 10799, 10949, 11579, 12401, 14369, 15013, 15329, 17377, 17903, 18251, 18427, 19309, 22441, 24023, 25057, 25229, 26041, 26699, 28111, 29017, 29207, 30707, 32939, 35051, 36583
Offset: 1

Views

Author

Syed Iddi Hasan, Aug 30 2012

Keywords

Comments

Such sequences already existed for all odd numbers <= 15. I chose the particular points (in A215991-A216020) so that by referring to a particular n-th term of one of these sequences, the expected range of the n-th term of an x-prime sum can be calculated for any odd x<100000.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..10^4],IsPrime);;
    Filtered(List([0..250],k->Sum([1..25],i->P[i+k])),IsPrime); # Muniru A Asiru, Feb 11 2018
  • Maple
    select(isprime, [seq(add(ithprime(i+k), i=1..25), k=0..250)]); # Muniru A Asiru, Feb 11 2018
  • Mathematica
    Select[ListConvolve[Table[1, 25], Prime[Range[500]]], PrimeQ] (* Jean-François Alcover, Jul 01 2018, after Harvey P. Dale *)
    Select[Total/@Partition[Prime[Range[300]],25,1],PrimeQ] (* Harvey P. Dale, Mar 04 2023 *)
  • PARI
    psumprm(m, n)={my(list=List(), s=sum(j=1,m,prime(j)), i=1); while(#listAndrew Howroyd, Feb 11 2018
    

A152468 Smallest of five consecutive primes whose sum is a prime.

Original entry on oeis.org

5, 7, 11, 13, 19, 29, 31, 43, 53, 59, 67, 73, 79, 107, 109, 113, 127, 137, 149, 151, 157, 163, 179, 191, 211, 223, 229, 263, 269, 307, 311, 349, 353, 359, 379, 383, 401, 409, 419, 433, 443, 449, 461, 467, 479, 521, 523, 541, 557, 569, 571, 577, 599, 613, 619
Offset: 1

Views

Author

Keywords

Comments

Surprisingly many terms are also in A073681. - Zak Seidov, Dec 17 2012

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];p3=Prime[n+3];p4=Prime[n+4];If[PrimeQ[p=p0+p1+p2+p3+p4],AppendTo[lst,p0]],{n,6!}];lst
    Transpose[Select[Partition[Prime[Range[500]], 5, 1], PrimeQ[Total[#]] &]][[1]] (* Harvey P. Dale, Jun 05 2013 *)
    Prime[Select[Range[150], PrimeQ[Sum[Prime[# + i], {i, 0, 4}]] &]] (* Bruno Berselli, Aug 21 2013 *)
  • PARI
    {a=2; b=3; c=5; d=7; e=11; for(n=1,100, s=a+b+c+d+e;
    if(isprime(s), print1(a", ")); a=b; b=c; c=d; d=e; e=nextprime(e+2))} /* Zak Seidov, Dec 17 2012 */

Extensions

More cross references from Harvey P. Dale, Jun 05 2013

A127340 Primes that are the sum of 11 consecutive primes.

Original entry on oeis.org

233, 271, 311, 353, 443, 491, 631, 677, 883, 1367, 1423, 1483, 1543, 1607, 1787, 1901, 1951, 2011, 2141, 2203, 2383, 3253, 3469, 3541, 3617, 3691, 3967, 4159, 4229, 4297, 4943, 5009, 5483, 5657, 5741, 5903, 5981, 6553, 6871, 6991, 7057, 7121, 7187, 7873
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes in A127338.
A prime number n is in the sequence if for some k it is the absolute value of coefficient of x^10 of the polynomial Prod_{j=0,10}(x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+10).

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[Sum[Prime[x + n], {n, 0, 10}]], AppendTo[a, Sum[Prime[x + n], {n, 0, 10}]]], {x, 1, 500}]; a
    Select[Total/@Partition[Prime[Range[200]],11,1],PrimeQ] (* Harvey P. Dale, Jul 16 2012 *)
  • PARI
    {m=125;k=11;for(n=0,m-1,a=sum(j=1,k,prime(n+j));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 13 2007
    
  • PARI
    {m=126;k=11;for(n=1,m,a=abs(polcoeff(prod(j=0,k-1,(x-prime(n+j))),k-1));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 13 2007

Extensions

Edited by Klaus Brockhaus, Jan 13 2007

A127341 Primes that can be written as the sum of 13 consecutive primes.

Original entry on oeis.org

691, 863, 983, 1153, 1283, 1553, 1621, 1753, 1823, 2111, 2239, 2311, 2963, 3191, 3617, 3853, 4099, 4357, 4519, 4597, 4999, 5081, 5393, 5471, 5623, 5693, 5849, 6229, 6491, 6971, 7349, 7673, 8123, 8191, 8669, 8933, 9391, 10141, 10499, 10949, 11273
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Examples

			691 = prime(10) + prime(11) + ... + prime(22) = 29 + 31 + ... + 79.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[Sum[Prime[i], {i, n, n + 12}], {n, 1, 150}], PrimeQ[ # ] &]
    Select[Total/@Partition[Prime[Range[200]],13,1],PrimeQ] (* Harvey P. Dale, Aug 13 2021 *)

Extensions

Edited by Stefan Steinerberger, Jul 31 2007

A127346 Primes in A127345.

Original entry on oeis.org

31, 71, 167, 311, 1151, 3119, 4871, 5711, 6791, 14831, 24071, 33911, 60167, 79031, 101159, 106367, 115631, 158231, 235751, 259751, 366791, 402551, 455471, 565919, 635711, 644951, 1124831, 1347971, 1510799, 1547927, 1743419, 1851671, 2048471
Offset: 1

Views

Author

Artur Jasinski, Jan 11 2007

Keywords

Comments

Primes of the form prime(k)*prime(k+1) + prime(k)*prime(k+2) + prime(k+1)*prime(k+2).
A prime number n is in the sequence if for some k it is the coefficient of x^1 of the polynomial Product_{j=0..2} (x-prime(k+j)); the roots of this polynomial are prime(k), ..., prime(k+2).

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[If[PrimeQ[Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[a, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]], AppendTo[b, Prime[x] Prime[x + 1] + Prime[x] Prime[x + 2] + Prime[x + 1] Prime[x + 2]]], {x, 1, 100}]; Print[a] (* Artur Jasinski, Jan 11 2007 *)
    s[li_] := li[[1]]*(li[[2]]+li[[3]])+li[[2]]*li[[3]]; Select[(s[#]&/@Partition[Prime[Range[100]], 3, 1]), PrimeQ] (* Zak Seidov, Jan 13 2012 *)
  • PARI
    {m=143;k=2;for(n=1,m,a=sum(i=n,n+k-1,sum(j=i+1,n+k,prime(i)*prime(j)));if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    {m=143;k=2;for(n=1,m,a=polcoeff(prod(j=0,k,(x-prime(n+j))),1);if(isprime(a),print1(a,",")))} \\ Klaus Brockhaus, Jan 21 2007
    
  • PARI
    p=2; q=3; forprime(r=5, 1e3, if(isprime(t=p*q+p*r+q*r), print1(t", ")); p=q; q=r) \\ Charles R Greathouse IV, Jan 13 2012

Formula

a(n) = A127345(A204231(n)). - Zak Seidov, Jan 13 2012

Extensions

Edited and extended by Klaus Brockhaus, Jan 21 2007

A342439 Let S(n,k) denote the set of primes < 10^n which are the sum of k consecutive primes, and let K = maximum k >= 2 such that S(n,k) is nonempty; then a(n) = max S(n,K).

Original entry on oeis.org

5, 41, 953, 9521, 92951, 997651, 9964597, 99819619, 999715711, 9999419621, 99987684473, 999973156643, 9999946325147, 99999863884699, 999999149973119, 9999994503821977, 99999999469565483, 999999988375776737, 9999999776402081701
Offset: 1

Views

Author

Bernard Schott, Mar 12 2021

Keywords

Comments

Inspired by the 50th problem of Project Euler (see link).
There must be at least two consecutive primes in the sum.
The corresponding number K of consecutive primes to get this largest prime is A342440(n) and the first prime of these A342440(n) consecutive primes is A342453(n).
It can happen that the sums of K = A342440(n) consecutive primes give two (or more) distinct n-digit primes. In that case, a(n) is the greatest of these primes. Martin Ehrenstein proved that there are only two such cases when 1 <= n <= 19, for n = 7 and n = 15 (see corresponding examples).
Solutions and Python program are proposed in Dreamshire and Archive.today links. - Daniel Suteu, Mar 12 2021

Examples

			a(1) = 5 = 2+3.
a(2) = 41 = 2 + 3 + 5 + 7 + 11 + 13; note that 97 = 29 + 31 + 37 is prime, sum of 3 consecutive primes, but 41 is obtained by adding 6 consecutive primes, so, 97 is not a term.
A342440(7) = 1587, and there exist two 7-digit primes that are sum of 1587 consecutive primes; as 9951191 = 5+...+13399 < 9964597 = 7+...+13411 hence a(7) = 9964597.
A342440(15) = 10695879 , and there exist two 15-digit primes that are sum of 10695879 consecutive primes; as 999998764608469 = 7+...+192682309 < 999999149973119 = 13+...+192682337, hence a(15) = 999999149973119.
		

Crossrefs

Extensions

Name improved by N. J. A. Sloane, Mar 12 2021
a(4)-a(17) from Daniel Suteu, Mar 12 2021
a(18)-a(19) from Martin Ehrenstein, Mar 13 2021
a(7) and a(15) corrected by Martin Ehrenstein, Mar 15 2021

A065867 Primes which are the sum of a prime number of consecutive primes.

Original entry on oeis.org

5, 23, 31, 41, 53, 59, 67, 71, 83, 97, 101, 109, 131, 139, 173, 181, 197, 199, 211, 223, 233, 251, 263, 269, 271, 281, 311, 331, 349, 353, 373, 401, 421, 431, 439, 443, 449, 457, 463, 487, 491, 499, 503, 523, 563, 587, 593, 607, 617, 631, 647, 659, 661, 677
Offset: 1

Views

Author

Henry Bottomley, Dec 07 2001

Keywords

Examples

			5 = 2 + 3.
23 = 5 + 7 + 11.
31 = 7 + 11 + 13.
41 = 11 + 13 + 17.
53 = 5 + 7 + 11 + 13 + 17.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[s=Prime[m];k=1;Do[p=Prime[n];s+=p;k++;If[PrimeQ[s]&&PrimeQ[k],If[s<=10837,AppendTo[lst,s]]],{n,m+1,5*5!}],{m,5*5!}];lst=Take[Union@lst,500] (* Vladimir Joseph Stephan Orlovsky, Sep 13 2009 *)
    Module[{nn=60,prs},prs=Prime[Range[nn]];Take[Select[Union[ Flatten[ Table[ Total/@ Partition[prs,n,1],{n,prs}]]],PrimeQ],nn]] (* Harvey P. Dale, Aug 12 2016 *)

A211170 Primes that are sum of both three and five consecutive primes.

Original entry on oeis.org

83, 199, 311, 941, 1151, 1381, 2357, 3121, 4337, 4363, 4957, 5059, 7039, 8069, 8117, 8161, 8389, 8627, 8819, 8971, 9011, 9349, 10211, 10253, 13127, 14813, 16249, 19207, 19717, 21377, 23143, 24329, 32983, 34807, 38113, 39623, 41141, 44279, 45061, 45979, 58403
Offset: 1

Views

Author

Zak Seidov, Jan 31 2013

Keywords

Comments

Intersection of A034962 and A034965.

Examples

			a(1) = 83 = A034962(6) = 23 + 29 + 31 = A034965(3) = 11 + 13 + 17 + 19 + 23.
		

Crossrefs

Programs

  • Mathematica
    Module[{prs=Prime[Range[3000]],pr3,pr5},pr3=Select[Total/@Partition[ prs, 3, 1], PrimeQ];pr5=Select[Total/@Partition[prs,5,1],PrimeQ];Intersection[ pr3,pr5]] (* Harvey P. Dale, Oct 24 2016 *)

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

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

Views

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.
		

Crossrefs

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