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.

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

This page as a plain text file.
%I A151745 #15 Aug 17 2020 22:13:32
%S A151745 405,1395,3435,3525,4245,4365,6675,6885,7155,7515,7995,8325,8445,9075,
%T A151745 10365,10845,11205,11543,13005,14235,14325,18075,19725,19875,22605,
%U A151745 23257,23475,23617,26805,27315,29835,29955,31035,32355,32925,33165,34395
%N A151745 Composites that are the sum of two, three, four and five consecutive composite numbers.
%H A151745 Robert Israel, <a href="/A151745/b151745.txt">Table of n, a(n) for n = 1..6214</a>
%F A151745 Intersection of A151740, A151741, A151742 and A151743. - _R. J. Mathar_, Jun 17 2009
%e A151745 405 is in the list because it is composite and
%e A151745 405 = 202 + 203 (Sum of two consecutive composite numbers)
%e A151745 405 = 134 + 135 + 136 (Sum of three consecutive composite numbers)
%e A151745 405 = 99 + 100 + 102 + 104 (Sum of four consecutive composite numbers)
%e A151745 405 = 78 + 80 + 81 + 82 + 84 (Sum of five consecutive composite numbers).
%p A151745 N:= 10^5: # for terms <= N
%p A151745 Comps:= remove(isprime, [$2..N]):
%p A151745 PSComps:= [0,op(ListTools:-PartialSums(Comps))]:
%p A151745 C2:= convert(PSComps[3..-1]-PSComps[1..-3],set):
%p A151745 C3:= convert(PSComps[4..-1]-PSComps[1..-4],set):
%p A151745 C4:= convert(PSComps[5..-1]-PSComps[1..-5],set):
%p A151745 C5:= convert(PSComps[6..-1]-PSComps[1..-6],set):
%p A151745 R:= convert(Comps,set) intersect C2 intersect C3 intersect C4 intersect C5:
%p A151745 sort(convert(R,list)); # _Robert Israel_, Aug 17 2020
%t A151745 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 *)
%K A151745 nonn
%O A151745 1,1
%A A151745 _Claudio Meller_, Jun 15 2009
%E A151745 Corrected and extended by _Harvey P. Dale_, Nov 25 2014
%E A151745 Corrected by _Robert Israel_, Aug 17 2020