OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(L, d) option remember; local i;
if d::even then seq([op(L), i], i=L[-1]+1..2)
else seq([op(L), i], i=0..L[-1]-1)
fi
end proc:
S[1]:= {[0], [1], [2]}:
for d from 2 to 10 do S[d]:= map(f, S[d-1], d) od:
A:= {}:
for d from 1 to 10 do
A:= A union map(proc(L) local i; add(L[i]*3^(i-1), i=1..nops(L)) end proc, select(L -> L[-1]>0, S[d]))
od:
sort(convert(A, list)); # Robert Israel, Jan 05 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved