OFFSET
0,3
LINKS
MAPLE
g:= proc(n, i) option remember; `if`(n=0, [0], `if`(i<1, [], [seq(
map(p->p+2^(i-1)*j, g(n-i*j, i-1))[], j=0..min(1, n/i))]))
end:
b:= proc() local l, i; l:=[]; i:=0;
proc(n) while nops(l)<=n do
l:=[l[], sort(g(i, i))[]]; i:=i+1 od; l[n+1]
end
end():
a:= proc() local t, a; t, a:= -1, proc() -1 end;
proc(n) local h;
while a(n) = -1 do
t:= t+1; h:= b(t);
if a(h) = -1 then a(h):= t fi
od; a(n)
end
end():
seq(a(n), n=0..100); # Alois P. Heinz, Sep 06 2014
CROSSREFS
KEYWORD
AUTHOR
Franklin T. Adams-Watters, Apr 28 2006
STATUS
approved