OFFSET
1,1
COMMENTS
EXAMPLE
Every composite is in this sequence as one consecutive composite. We account for primes thus:
a(10) = 17 = 8 + 9.
a(12) = 19 = 9 + 10.
a(16) = 23 = 6 + 8 + 9.
a(22) = 29 = 14 + 15.
a(24) = 31 = 9 + 10 + 12.
a(30) = 37 = 4 + 6 + 8 + 9 + 10.
a(34) = 41 = 20 + 21 = 12 + 14 + 15.
a(36) = 43 = 21 + 22.
Not included = 47.
a(45) = 53 = 26 + 27 = 8 + 9 + 10 + 12 + 14.
a(51) = 59 = 18 + 20 + 21 = 6 + 8 + 9 + 10 + 12 + 14.
Not included = 61.
a(58) = 67 = 33 + 34 = 21 + 22 + 24 = 10 + 12 + 14 + 15 + 16.
a(62) = 71 = 35 + 36 = 22 + 24 + 25 = 4 + 6 + 8 + 9 + 10 + 12 + 14.
Not included = 73.
a(69) = 79 = 39 + 40.
a(73) = 83 = 14 + 15 + 16 + 18 + 20.
a(79) = 89 = 44 + 45.
a(87) = 97 = 48 + 49 = 22 + 24 + 25 + 26.
a(91) = 101 = 50 + 51.
a(93) = 103 = 51 + 52.
MAPLE
isA133576 := proc(n)
local i, j ;
for i from 1 do
if A002808(i) > n then
return false;
end if;
for j from i do
s := add( A002808(l), l=i..j) ;
if s > n then
break;
elif s = n then
return true;
end if;
end do:
end do:
end proc:
A133576 := proc(n)
local a;
if n = 1 then
return A002808(1) ;
else
for a from procname(n-1)+1 do
if isA133576(a) then
return a;
end if;
end do:
end if ;
end proc:
seq(A133576(n), n=1..71) ; # R. J. Mathar, Feb 14 2015
MATHEMATICA
okQ[n_] := If[CompositeQ[n], True, MemberQ[IntegerPartitions[n, All, Select[Range[n], CompositeQ]], p_List /; Length[p] == Length[Union[p]] && AllTrue[Complement[Range[p[[-1]], p[[1]]], p], PrimeQ]]];
Select[Range[150], okQ] (* Jean-François Alcover, Oct 27 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Dec 26 2007
STATUS
approved