What is the largest even positive integer that cannot be expressed as the sum of two composite odd numbers?
clearvars
oddComp=[]
for a=3:2:299
for b=3:2:299
oddComp(end+1)=a*b;
end
end
oddComp=unique(oddComp);
sumlist=[]
for a=1:length(oddComp)
for b=a:length(oddComp)
s=oddComp(a)+oddComp(b);
if ~ismember(s,sumlist)
sumlist(end+1)=s;
end
end
end
goodlist=2:2:500;
goodlist=setdiff(goodlist,sumlist)
It lookks like the list stops at 38:
2 4 6 8 10 12 14 16 20 22 26 28 32 38
The remaining numbers up through 500 all are sums of at least one pair of odd composites.
|
Posted by Charlie
on 2024-06-18 06:57:53 |