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 10 results.

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
    

A070934 Smallest prime equal to the sum of 2n+1 consecutive primes.

Original entry on oeis.org

2, 23, 53, 197, 127, 233, 691, 379, 499, 857, 953, 1151, 1259, 1583, 2099, 2399, 2417, 2579, 2909, 3803, 3821, 4217, 4651, 5107, 5813, 6829, 6079, 6599, 14153, 10091, 8273, 10163, 9521, 12281, 13043, 11597, 12713, 13099, 16763, 15527, 16823, 22741
Offset: 0

Views

Author

Lekraj Beedassy, May 21 2002

Keywords

Examples

			Every term of the increasing sequence of primes 127, 401, 439, 479, 593,... is splittable into a sum of 9 consecutive odd primes and 127 = 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 is the least one corresponding to n = 4.
		

Crossrefs

Cf. Bisection of A070281.
See A082244 for another version.

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s},While[s = Sum[Prime[i], {i, k, k + 2n}]; !PrimeQ[s], k++ ]; s]; Table[f[n], {n, 0, 41}] (* Ray Chandler, Sep 27 2006 *)

Extensions

Corrected and extended by Ray G. Opao, Aug 26 2004
Entry revised by Ray Chandler, Sep 27 2006

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

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

A082244 Smallest odd prime that is the sum of 2n+1 consecutive primes.

Original entry on oeis.org

3, 23, 53, 197, 127, 233, 691, 379, 499, 857, 953, 1151, 1259, 1583, 2099, 2399, 2417, 2579, 2909, 3803, 3821, 4217, 4651, 5107, 5813, 6829, 6079, 6599, 14153, 10091, 8273, 10163, 9521, 12281, 13043, 11597, 12713, 13099, 16763, 15527, 16823, 22741
Offset: 0

Views

Author

Cino Hilliard, May 09 2003

Keywords

Examples

			For n = 2,
2+3+5+7+11=28
3+5+7+11+13=39
5+7+11+13+17=53
so 53 is the first prime that is the sum of 5 consecutive primes
		

Crossrefs

See A070934 for another version.

Programs

  • Maple
    P:= select(isprime, [seq(i,i=3..3000,2)]):
    S:= [0,op(ListTools:-PartialSums(P))]: nS:= nops(S):
    R:= NULL:
    for n from 1 do
      found:= false;
      for j from 1 to nS - 2*n + 1 while not found do
        v:= S[j+2*n-1]-S[j];
        if isprime(v) then R:= R,v; found:= true fi
      od;
      if not found then break fi;
    od:
    R; # Robert Israel, Jan 09 2025
  • Mathematica
    Join[{3},Table[SelectFirst[Total/@Partition[Prime[Range[1000]],2n+1,1],PrimeQ],{n,50}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 15 2016 *)
  • PARI
    \\ First prime that the sum of an odd number of consecutive primes
    psumprm(n) = { sr=0; forstep(i=1,n,2, s=0; for(j=1,i, s+=prime(j); ); for(x=1,n, s = s - prime(x)+ prime(x+i); if(isprime(s),sr+=1.0/s; print1(s" "); break); ); ); print(); print(sr) }

Formula

The sum of the reciprocals = 0.4304...

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

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

A125270 Coefficient of x^2 in polynomial whose zeros are 5 consecutive primes starting with the n-th prime.

Original entry on oeis.org

1358, 3954, 10478, 22210, 43490, 78014, 129530, 206650, 324350, 466270, 621466, 853742, 1132130, 1436690, 1870850, 2388050, 2886370, 3440410, 4133410, 4904906, 5926654, 7195670, 8425430, 9792950, 11040910, 12098990, 13917898, 16097810
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Sums of all distinct products of 3 out of 5 consecutive primes, starting with the n-th prime; value of 3rd elementary symmetric function on the 5 consecutive primes.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[AppendTo[a, (Prime[x] Prime[x + 1] Prime[x + 2] + Prime[x] Prime[x + 1] Prime[x + 3] + Prime[x] Prime[x + 1] Prime[x + 4] + Prime[x] Prime[x + 2] Prime[x + 3] + Prime[x] Prime[x + 2] Prime[x + 4] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2] Prime[x + 3] + Prime[x + 1] Prime[x + 2] Prime[x + 4] + Prime[x + 1] Prime[x + 3] Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])], {x, 1, 100}]; a
    fcp[{p_,q_,r_,s_,t_}]:=p*q(r+s+t)+(p+q)r(s+t)+(p+q+r)s*t; fcp/@Partition[ Prime[ Range[40]],5,1] (* Harvey P. Dale, Sep 05 2014 *)

Formula

Let p = Prime(n), q = Prime(n+1), r = Prime(n+2), s = Prime(n+3) and t = Prime(n+4). Then a(n) = p q (r+s+t) + (p + q) r (s + t) + (p + q + r) s t.

Extensions

Edited and corrected by Franklin T. Adams-Watters, Jan 23 2007

A339866 Primes that are simultaneously the sums of 11, 13, and 15 consecutive primes.

Original entry on oeis.org

8472193, 14084311, 16569827, 28358851, 33546551, 45993127, 91174081, 123593753, 186861293, 205286087, 224010023, 227568853, 310359607, 335497667, 423104119, 454320901, 482749429, 492404317, 558048187, 560997023, 566428813, 700508971, 707060359, 715731761, 735276379
Offset: 1

Views

Author

Zak Seidov, Apr 24 2021

Keywords

Comments

Intersection of A127340, A127341, A161612.
The first case with 17 consecutive primes is a(219) = 8410721789. Are there more such terms?
a(10) = 205286087 is the sum of k consecutive primes not only for k = 11, 13, and 15, but also for k=1 (i.e., a(10) is a prime), k=9, and k=233. - Jon E. Schoenfield, Apr 24 2021

Examples

			Sum_{k=61746..61756} prime(k) = Sum_{k=52937..52949} prime(k) = Sum_{k=46425..46439} prime(k) = 8472193, so 8472193 is a term. - _Jon E. Schoenfield_, Apr 24 2021
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=4*10^6,prs,p11,p13,p15},prs=Prime[Range[nn]];p11=Total/@Partition[prs,11,1];p13=Total/@Partition[prs,13,1]; p15=Total/@ Partition[ prs,15,1];Select[Intersection[ p11,p13,p15],PrimeQ]] (* Harvey P. Dale, Aug 14 2023 *)

A341338 a(n) is the smallest prime that is simultaneously the sum of 2n-1, 2n+1 and 2n+3 consecutive primes.

Original entry on oeis.org

83, 311, 55813, 437357, 1219789, 8472193, 9496853, 6484103, 2166953, 37296143, 12671599, 13432571, 14968909, 145616561, 732092831, 220872569, 1381099933, 93482633, 4142423, 87030017, 3193060007, 736535783, 6390999871, 280886077, 464341303, 268231657, 686836817, 9000046663
Offset: 1

Views

Author

Zak Seidov, Apr 25 2021

Keywords

Examples

			For n = 1: 83 = 23 + 29 + 31 = 11 + 13 + 17 + 19 + 23, and 83 is the smallest prime that is the sum of 1, 3 and 5 consecutive primes, so a(1) = 83.
		

Crossrefs

Programs

  • Mathematica
    Array[(k=1;
    While[(i=Select[Intersection@@((Total/@Subsequences[Prime@Range@Prime[k++],{#}])&/@{2#-1,2#+1,2#+3}),PrimeQ])=={}];First@i)&,4] (* Giorgos Kalogeropoulos, Apr 26 2021 *)
Showing 1-10 of 10 results.