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

A034707 Numbers that are sums (of a nonempty sequence) of consecutive primes.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 11, 12, 13, 15, 17, 18, 19, 23, 24, 26, 28, 29, 30, 31, 36, 37, 39, 41, 42, 43, 47, 48, 49, 52, 53, 56, 58, 59, 60, 61, 67, 68, 71, 72, 73, 75, 77, 78, 79, 83, 84, 88, 89, 90, 95, 97, 98, 100, 101, 102, 103, 107, 109, 112, 113, 119, 120, 121, 124, 127
Offset: 1

Views

Author

Keywords

Comments

A050936 is a subsequence (which still includes primes, embodied by A067377). - Enoch Haga, Jun 16 2002, R. J. Mathar, Oct 10 2010

Crossrefs

Complement is A050940.

Programs

  • Mathematica
    f[n_] := Block[{len = PrimePi@ n}, p = Prime@ Range@ len; Count[ Flatten[ Table[ p[[i ;; j]], {i, len}, {j, i, len}],1], q_ /; Total@ q == n]]; Select[ Range@ 1000, f@ # > 0 &] (* Or quicker for a larger range *)
    lmt = 10000; p = Prime@ Range@ PrimePi@ lmt; t = Table[0, {lmt}]; Do[s = 0; j = i; While[s = s + p[[j]]; s <= lmt, t[[s]]++; j++], {i, Length@ p}]; Select[ Range@ lmt, t[[#]] > 0 &]
    upto=200;Select[Union[Flatten[Table[ Total/@Partition[Prime[ Range[ PrimePi[ upto]]],n,1],{n,upto-1}]]],#<=upto&] (* Harvey P. Dale, Jul 15 2011 *)
  • PARI
    is(n)=if(isprime(n), return(1)); my(v,m=1,t); while(1, v=vector(m++); v[m\2]=precprime(n\m); for(i=m\2+1,m,v[i]=nextprime(v[i-1]+1)); forstep(i=m\2-1,1,-1,v[i]=precprime(v[i+1]-1)); if(v[1]==0, return(0)); t=vecsum(v); if (t==n, return(1)); if(t>n, while(t>n, t-=v[m]; v=concat(precprime(v[1]-1), v[1..m-1]); t+=v[1]), while(tCharles R Greathouse IV, May 05 2016

Formula

A054845(a(n)) > 0. - Ray Chandler, Sep 20 2023

Extensions

Updated a misleading comment. - R. J. Mathar, Oct 10 2010

A037174 Primes which are not the sum of consecutive composite numbers.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 47, 61, 73, 107, 167, 179, 313, 347, 421, 479, 719, 863, 1153, 1213, 1283, 1307, 1523, 3467, 3733, 4007, 4621, 4787, 5087, 5113, 5413, 7523, 7703, 9817, 10333, 12347, 12539, 13381, 17027, 18553, 19717, 19813, 23399, 26003, 31873, 36097, 38833
Offset: 1

Views

Author

Keywords

Comments

It seems reasonable that a(n)/A079149(n) has an asymptote that could be estimated. - Peter Munn, Aug 21 2023

Crossrefs

Subsequence of A079149.
With {1}, the complement of A133576.
Primes that are the sum of specific numbers of consecutive composite numbers: A060254 (2), A060328 (3), A060329 (4), A060330 (5), A060331 (6), A060332 (7), A060333 (8).

Programs

  • Maple
    N:= 5000:
    primes,comps:= selectremove(isprime,{$2..N}):
    M:= nops(comps):
    X:= primes:
    for n from 1 to floor(sqrt(2*N)) do
    i:= 1;
    T:= add(comps[k],k=1..n);
    while T <= N do
    X := X minus {T};
    if i + n > M then break fi;
    T := T + comps[i+n] - comps[i];
    i := i+1;
    od;
    od:
    X;
    # Robert Israel, Jun 24 2008

Extensions

More terms from Jud McCranie, Jul 12 2000
Corrected by T. D. Noe, Aug 15 2008

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

A074192 Number of numbers 0 <= m < 10^n which are not the sum of one or more consecutive primes.

Original entry on oeis.org

5, 47, 520, 5191, 51462, 518001, 5205110, 52209546, 522955756
Offset: 1

Views

Author

Jean-christophe Colin (jc-colin(AT)wanadoo.fr), Sep 19 2002

Keywords

Comments

If the upper limit is changed to include 10^n, the entries are increased by 1 for n = 3, 4, 5,.. and perhaps others, because 1000, 10000 and 100000 are not sums of consecutive primes, whereas 10=2+3+5 and 100=2+3+5+...+19+23 are. [R. J. Mathar, Oct 10 2010]
Based on work of Enoch Haga, Jud McCranie and Felice Russo.
The ratio a(n)/10^n might be converging to 0.52..., it might also be slowly growing to 1, which way is it? - Daniel Forgues, Nov 03 2011

Crossrefs

Cf. A050940.

Extensions

Definition corrected by R. J. Mathar, Oct 10 2010
a(8) corrected and a(9) from Sean A. Irvine, Jan 14 2025
Showing 1-4 of 4 results.