greedy computation of pseudoperfect numbers?
Jonathan Post
jvospost3 at gmail.com
Wed Apr 9 20:35:46 CEST 2008
Thank you, Richard Mathar. I submitted this as follows.
NEW SEQUENCE FROM Jonathan Vos Post
%I A000001
%S A000001 4, 6, 9, 14, 22, 57, 111, 218, 445, 879, 1754
%N A000001 a(n) = least semiprime such that all subsets of
{a(1),...,a(n)} have a different sum.
%C A000001 Maple code and extension by R. J. Mathar
(mathar(AT)strw.leidenuniv.nl)
%D A000001 J. Stanley Benkoski and P. Erdos, On weird and
pseudoperfect numbers, Math. Comp. 28, no. 126, 617–623, 1974.
%p A000001 isA001358 := proc(n)
if numtheory[bigomega](n) = 2 then
true;
else
false;
fi ;
end:
setsum := proc(S)
add(i,i=S) ;
end:
a := [4] :
while true do
for anxt from op(-1,a)+1 do
if isA001358(anxt) then
aset := combinat[powerset](convert(a,set) union {anxt} );
sset := {} ;
for s in aset do
sset := sset union { setsum(s) } ;
od:
if nops(sset) = nops(aset) then
a := [op(a),anxt] ;
print(a) ;
break ;
fi ;
fi ;
od:
od:
%Y A000001 Cf. A001358, A006037, A064934.
%O A000001 1,1
%K A000001 ,easy,more,nonn,
%A A000001 Jonathan Vos Post (jvospost3 at gmail.com), Apr 09 2008
RH
RA 192.20.225.32
RU
RI
More information about the SeqFan
mailing list