login
A118463
Inverse permutation to A118462.
2
0, 1, 2, 3, 4, 5, 7, 10, 6, 8, 11, 14, 15, 19, 25, 33, 9, 12, 16, 20, 21, 26, 34, 43, 27, 35, 44, 55, 56, 70, 88, 110, 13, 17, 22, 28, 29, 36, 45, 57, 37, 46, 58, 71, 72, 89, 111, 137, 47, 59, 73, 90, 91, 112, 138, 169, 113, 139, 170, 207, 208, 253, 307, 371, 18, 23, 30, 38, 39
OFFSET
0,3
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
Cf. A118462.
Sequence in context: A357166 A302940 A272072 * A214652 A137929 A094617
KEYWORD
base,nonn,look
AUTHOR
STATUS
approved