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

A161689 Intersection of A151740 and A151741.

Original entry on oeis.org

49, 99, 153, 161, 171, 175, 185, 189, 221, 231, 235, 243, 247, 265, 285, 289, 319, 329, 341, 351, 369, 375, 391, 405, 429, 435, 441, 469, 473, 495, 507, 517, 531, 535, 545, 549, 581, 589, 603, 609, 639, 645, 651, 657, 667, 671, 679, 689, 711, 715, 725, 729
Offset: 1

Views

Author

Zak Seidov, Jun 17 2009

Keywords

Comments

Composite numbers that are sum of two and three consecutive composite numbers. Provably only odd integers.

Examples

			49=24+25=15+16+18
99=49+50=32+33+34
153=76+77=50+51+52.
		

Crossrefs

Programs

  • Mathematica
    Module[{c=Select[Range[800],CompositeQ],s2,s3},s2=Total/@Partition[c,2,1];s3=Total/@Partition[c,3,1];Intersection[c,s2,s3]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 27 2019 *)

A151740 Composites that are the sum of two consecutive composite numbers.

Original entry on oeis.org

10, 14, 22, 26, 34, 38, 46, 49, 51, 55, 58, 62, 65, 69, 74, 77, 82, 86, 91, 94, 99, 106, 111, 115, 118, 122, 125, 129, 134, 142, 146, 153, 155, 158, 161, 166, 169, 171, 175, 178, 183, 185, 187, 189, 194, 202, 206, 209, 214, 218, 221, 226, 231, 235, 237, 243, 245
Offset: 1

Views

Author

Claudio Meller, Jun 15 2009

Keywords

Comments

The even terms of this sequence are exactly twice the primes > 3. The odd terms are odd composites c for which the odd integer next to c/2 is not prime. - M. F. Hasler, Jun 16 2009
The English language can be ambiguous! What is meant here is: write down a list of the composite numbers 4,6,8,9,10,12,... Whenever the sum of two adjacent terms is composite, adjoin it to the sequence: 4+6=10, 6+8=14, 10+12=22, ... - N. J. A. Sloane, Nov 26 2019

Crossrefs

Cf. A167611 (Essentially the same, except for initial term).

Programs

  • Mathematica
    CompositeNext[n_]:=Module[{k=n+1},While[PrimeQ[k],k++ ];k]; q=6!;lst2={};Do[If[ !PrimeQ[n],c=CompositeNext[n];a2=n+c;If[ !PrimeQ[a2],AppendTo[lst2,a2]]],{n,q}];lst2 (* Vladimir Joseph Stephan Orlovsky, Jun 17 2009 *)
    Module[{c=Select[Range[300],CompositeQ],s2},s2=Total/@Partition[c,2,1];Intersection[c,s2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 27 2019 *)
  • PARI
    isA151740(n)= bittest(n,0) || return(isprime(n/2) && n>6); !isprime(bitor(n\2,1)) && !isprime(n) && n>1 \\ M. F. Hasler, Jun 16 2009
    
  • Python
    from sympy import isprime, composite
    print([totest for k in range(1,92) if not isprime(totest := composite(k) + composite(k+1))]) # Karl-Heinz Hofmann, Feb 06 2024

A060328 Primes which are the sum of three consecutive composite numbers.

Original entry on oeis.org

23, 31, 41, 59, 67, 71, 109, 113, 131, 139, 157, 199, 211, 239, 251, 269, 293, 311, 337, 379, 383, 409, 419, 487, 491, 499, 503, 521, 571, 599, 631, 701, 751, 769, 773, 787, 829, 877, 881, 919, 941, 953, 991, 1009, 1013, 1039, 1049, 1061, 1103, 1117, 1151
Offset: 1

Views

Author

Robert G. Wilson v, Mar 30 2001

Keywords

Comments

"Consecutive" necessarily means consecutive in the list of composite numbers as opposed to consecutive in the integers, as the sum of any 3 consecutive integers is a multiple of 3. - Peter Munn, Aug 20 2023

Examples

			a(3) = 41 is equal to 12+14+15.
		

Crossrefs

Primes that are the sum of other numbers of consecutive composite numbers: A060254 (2), A060329 (4), A060330 (5), A060331 (6), A060332 (7), A060333 (8). See also A037174.
Cf. A034962.
Complement within A166039\{5, 11} of A151741.

Programs

  • Mathematica
    composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); b = {}; Do[ p = composite[ n ] + composite[ n + 1 ] + composite[ n + 2 ]; If[ PrimeQ[ p ], b = Append[ b, p ] ], {n, 1, 1000} ]; b

A151742 Composite numbers which are the sum of four consecutive composite numbers.

Original entry on oeis.org

27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 92, 102, 106, 111, 117, 123, 129, 134, 138, 143, 148, 153, 159, 165, 171, 177, 183, 188, 198, 202, 207, 212, 217, 222, 226, 231, 237, 243, 249, 254, 258, 268, 273, 279, 285, 291, 297, 302
Offset: 1

Views

Author

Claudio Meller, Jun 15 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Total/@Partition[Select[Range[100],CompositeQ],4,1],CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 21 2020 *)

Extensions

Definition clarified by Harvey P. Dale, Apr 21 2020

A151745 Composites that are the sum of two, three, four and five consecutive composite numbers.

Original entry on oeis.org

405, 1395, 3435, 3525, 4245, 4365, 6675, 6885, 7155, 7515, 7995, 8325, 8445, 9075, 10365, 10845, 11205, 11543, 13005, 14235, 14325, 18075, 19725, 19875, 22605, 23257, 23475, 23617, 26805, 27315, 29835, 29955, 31035, 32355, 32925, 33165, 34395
Offset: 1

Views

Author

Claudio Meller, Jun 15 2009

Keywords

Examples

			405 is in the list because it is composite and
405 = 202 + 203 (Sum of two consecutive composite numbers)
405 = 134 + 135 + 136 (Sum of three consecutive composite numbers)
405 = 99 + 100 + 102 + 104 (Sum of four consecutive composite numbers)
405 = 78 + 80 + 81 + 82 + 84 (Sum of five consecutive composite numbers).
		

Programs

  • Maple
    N:= 10^5: # for terms <= N
    Comps:= remove(isprime, [$2..N]):
    PSComps:= [0,op(ListTools:-PartialSums(Comps))]:
    C2:= convert(PSComps[3..-1]-PSComps[1..-3],set):
    C3:= convert(PSComps[4..-1]-PSComps[1..-4],set):
    C4:= convert(PSComps[5..-1]-PSComps[1..-5],set):
    C5:= convert(PSComps[6..-1]-PSComps[1..-6],set):
    R:= convert(Comps,set) intersect C2 intersect C3 intersect C4 intersect C5:
    sort(convert(R,list)); # Robert Israel, Aug 17 2020
  • Mathematica
    CompositeNext[n_]:=Module[{k=n+1},While[PrimeQ[k],k++ ];k]; q=8!; lst2={};Do[If[ !PrimeQ[n],c=CompositeNext[n];a2=n+c;If[ !PrimeQ[a2],AppendTo[lst2,a2]]],{n,q}];lst2; lst3={};Do[If[ !PrimeQ[n],c1=CompositeNext[n];c2=CompositeNext[c1];a3=n+c1+c2;If[ !PrimeQ[a3],AppendTo[lst3,a3]]],{n,q}];lst3; lst4={};Do[If[ !PrimeQ[n],c1=CompositeNext[n];c2=CompositeNext[c1];c3=CompositeNext[c2];a4=n+c1+c2+c3;If[ !PrimeQ[a4],AppendTo[lst4,a4]]],{n,q}];lst4; lst5={};Do[If[ !PrimeQ[n],c1=CompositeNext[n];c2=CompositeNext[c1];c3=CompositeNext[c2];c4=CompositeNext[c3];a5=n+c1+c2+c3+c4;If[ !PrimeQ[a5],AppendTo[lst5,a5]]],{n,q}];lst5; Intersection[lst2,lst3,lst4,lst5] (* Vladimir Joseph Stephan Orlovsky, Jun 17 2009 *)

Formula

Intersection of A151740, A151741, A151742 and A151743. - R. J. Mathar, Jun 17 2009

Extensions

Corrected and extended by Harvey P. Dale, Nov 25 2014
Corrected by Robert Israel, Aug 17 2020

A151743 Composite which are the sum of five consecutive composite numbers.

Original entry on oeis.org

45, 60, 75, 90, 105, 112, 118, 124, 130, 136, 143, 150, 164, 170, 176, 182, 188, 195, 203, 210, 217, 225, 232, 238, 244, 250, 256, 262, 268, 274, 280, 286, 300, 314, 320, 326, 332, 338, 345, 360, 374, 380, 386, 392, 398, 405
Offset: 1

Views

Author

Claudio Meller, Jun 15 2009

Keywords

Crossrefs

Showing 1-6 of 6 results.