OFFSET
1,1
COMMENTS
MAPLE
with(combinat);
P:=proc(i)
local a, j, k, n, ok, S, v;
v:=array(1..10000); j:=0;
for n from 1 to i do
a:={};
for k from 2 to n-1 do
if abs((n mod k)- k/2) < 1 then a:=a union {k}; fi;
od;
S:=subsets(a);
while not S[finished] do
if convert(S[nextvalue](), `+`)=n then
if j=0 then j:=1; v[1]:=n; print(n); break;
else
ok:=1;
for k from 1 to j do
if trunc(n/v[k])=n/v[k] then ok:=0; break; fi;
od;
j:=j+1; v[j]:=n; if ok=1 then print(n); fi;
fi;
fi;
od;
od;
end:
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Jul 20 2011
STATUS
approved