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-5 of 5 results.

A067377 Primes expressible as the sum of (at least two) consecutive primes in at least 1 way.

Original entry on oeis.org

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

Views

Author

Patrick De Geest, Feb 04 2002

Keywords

Examples

			The prime 83, for example, is the sum of the five consecutive primes 11 + 13 + 17 + 19 + 23.
The prime 2011, for example, is the sum of the eleven consecutive primes 157 + 163 + 167 + 173 + 179 + 181 + 191 + 193 + 197 + 199 + 211. - _Daniel Forgues_, Nov 03 2011
		

Crossrefs

Cf. A197227 (primes that are not the sum of consecutive primes).

Programs

  • Mathematica
    p = {}; Do[a = Table[ Prime[i], {i, n, 150}]; l = Length[a]; k = 2; While[k < l + 1, b = Plus @@@ Partition[a, k]; k++; p = Append[ p, Select[ b, PrimeQ[ # ] &]]], {n, 1, 149}]; Take[ Union[ Flatten[p]], 70]
    m=5!; lst={}; Do[p=Prime[a]; Do[p+=Prime[b]; If[PrimeQ[p]&&p<=Prime[m]*3+8,AppendTo[lst,p]],{b,a+1,m+2,1}],{a,m}]; Union[lst] (* Vladimir Joseph Stephan Orlovsky, Aug 15 2009 *)

Formula

Prime(n) such that A307610(n) > 1. - Ray Chandler, Sep 21 2023

Extensions

Offset changed to 1 by Hans Havermann, Oct 07 2018

A067380 Primes expressible as the sum of (at least two) consecutive primes in at least 4 ways.

Original entry on oeis.org

311, 863, 14369, 14699, 15329, 19717, 29033, 34421, 36467, 37607, 40433, 42463, 48731, 49253, 49499, 55813, 67141, 70429, 76423, 78791, 85703, 90011, 94559, 97159, 98411, 109159, 110359, 110527, 125821, 130513, 134921, 141587, 147031, 147347, 155087, 155387
Offset: 1

Views

Author

Patrick De Geest, Feb 04 2002

Keywords

Comments

Note that the definition says "at least two", so a(n) = a(n) itself is not allowed as a possible sum (see Examples).

Examples

			311 is a term because 311 is prime and
  11+13+17+19+23+29+31+37+41+43+47 = 311,
  31+37+41+43+47+53+59 = 311,
  53+59+61+67+71 = 311,
  101+103+107 = 311.
1151 is not a term, since although 1151 is prime it only has three representations of the required form:
  101+97+89+83+79+73+71+67+61+59+53+47+43+41+37+31+29+23+19+17+13+11+7 = 1151,
  239+233+229+227+223 = 1151,
  389+383+379 = 1151.
Also, 16277 is not a term because although it has five representations as a sum of consecutive primes, it is not itself a prime. - _Sean A. Irvine_, Dec 25 2021
		

Crossrefs

Programs

  • Magma
    M:=160000; P:=PrimesUpTo(M); S:=[0]; for p in P do t:=S[#S]+p; if #S ge 3 then if t-S[#S-2] gt M then break; end if; end if; S[#S+1]:=t;end for; c:=[0:j in [1..M]]; for C in [2..#S-1] do if IsEven(C) then L:=1; else L:=#S-C; end if; for j in [1..L] do s:=S[j+C]-S[j]; if s gt M then break; end if; if IsPrime(s) then c[s]+:=1; end if; end for; end for; [j:j in [1..M]|c[j] ge 4]; // Jon E. Schoenfield, Dec 25 2021
  • Mathematica
    m=7!; lst={}; Do[p=Prime[a]; Do[p+=Prime[b]; If[PrimeQ[p]&&pVladimir Joseph Stephan Orlovsky, Aug 15 2009 *)

Formula

Prime(n) such that A307610(n) > 4. - Ray Chandler, Sep 21 2023

Extensions

The terms have been confirmed by Sean A. Irvine, Dec 24 2021. - N. J. A. Sloane, Dec 25 2021

A067378 Primes expressible as the sum of (at least two) consecutive primes in at least 2 ways.

Original entry on oeis.org

41, 83, 197, 199, 223, 251, 281, 311, 401, 439, 491, 593, 733, 857, 863, 883, 941, 983, 991, 1061, 1151, 1187, 1283, 1361, 1367, 1381, 1433, 1439, 1493, 1511, 1523, 1553, 1607, 1753, 1801, 1823, 1901, 1951, 2011, 2027, 2099, 2111, 2179, 2203, 2267, 2357, 2393, 2417, 2579, 2647, 2689, 2731
Offset: 1

Views

Author

Patrick De Geest, Feb 04 2002

Keywords

Crossrefs

Programs

  • Mathematica
    m=3*5!; lst={}; Do[p=Prime[a]; Do[p+=Prime[b]; If[PrimeQ[p]&&pVladimir Joseph Stephan Orlovsky, Aug 15 2009 *)
  • PARI
    e=2500; for(d=2,e, if(d%2==1,h=d/3,h=d/2); f=floor(2*d/(log(d)*3)); g=0; for(c=1,f,a=0; b=0; forprime(n=prime(c),h+50,a=a+n; b=b+1;if (a==d,g=g+1; if(g>=2&isprime(a),print1(a, ", ")),if(a>d,next(2)))))) /* The parameter g selects the number of ways wanted. - Robin Garcia, Jan 11 2011 */

Formula

Prime(n) such that A307610(n) > 2. - Ray Chandler, Sep 21 2023

A067379 Primes expressible as the sum of (at least two) consecutive primes in at least 3 ways.

Original entry on oeis.org

311, 863, 1151, 1367, 1951, 2393, 2647, 2689, 3389, 4957, 5059, 5153, 7451, 7901, 8819, 10499, 10859, 10949, 12329, 12641, 12713, 13127, 13297, 14369, 14699, 14759, 14951, 15091, 15329, 15527, 16223, 16249, 16829, 18089, 18311, 18401
Offset: 1

Views

Author

Patrick De Geest, Feb 04 2002

Keywords

Crossrefs

Programs

  • Mathematica
    m=2*6!; lst={}; Do[p=Prime[a]; Do[p+=Prime[b]; If[PrimeQ[p]&&pVladimir Joseph Stephan Orlovsky, Aug 15 2009 *)

Formula

Prime(n) such that A307610(n) > 3. - Ray Chandler, Sep 21 2023

A197227 Primes that are not the sum of at least two consecutive primes.

Original entry on oeis.org

2, 3, 7, 11, 13, 19, 29, 37, 43, 47, 61, 73, 79, 89, 103, 107, 113, 137, 149, 151, 157, 163, 167, 179, 191, 193, 227, 229, 239, 241, 257, 277, 283, 293, 307, 313, 317, 337, 347, 359, 367, 383, 389, 397, 409, 419, 433, 461, 467, 509, 521, 541, 547, 557, 569
Offset: 1

Views

Author

T. D. Noe, Nov 03 2011

Keywords

Comments

Complement of A067377 in the primes. For the primes less than 10^6, these primes make up about 56%.

Crossrefs

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..10^3)]:
    S:= ListTools:-PartialSums([0,op(P)]):
    sort(convert(convert(P,set) minus {seq(seq(S[i]-S[j],j=1..i-2),i=1..10^3+1)},list)); # Robert Israel, May 09 2021
  • Mathematica
    lim = 1000; pFound = {}; ps = Prime[Range[PrimePi[lim]]]; sm = ps; i = 0; While[i++; j = 1; While[sm[[j]] = sm[[j]] + ps[[i + j]]; sm[[j]] <= lim, If[PrimeQ[sm[[j]]], AppendTo[pFound, sm[[j]]]]; j++]; j > 1]; Complement[ps, pFound]

Formula

Prime(n) such that A307610(n) = 1. - Ray Chandler, Sep 21 2023

Extensions

Definition clarified by Jonathan Sondow, May 18 2013
Showing 1-5 of 5 results.