OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1863
EXAMPLE
a(0) = 0: [].
a(1) = 1: [1].
a(2) = 5 = 2+3: [1,1], [1,2].
a(3) = 19 = 3+4+5+7: [1,1,1], [1,1,2], [1,2,2], [1,2,4].
a(4) = 72 = 4+5+7+6+8+7+9+11+15: [1,1,1,1], [1,1,1,2], [1,1,1,4], [1,1,2,2], [1,1,2,4], [1,2,2,2], [1,2,2,4], [1,2,4,4], [1,2,4,8].
a(5) = 260 = 5+6+8+7+9+11+15+8+10+12+16+9+11+15+13+17+15+19+23+31: [1,1,1,1,1], [1,1,1,1,2], [1,1,1,1,4], [1,1,1,2,2], [1,1,1,2,4], [1,1,1,4,4], [1,1,1,4,8], [1,1,2,2,2], [1,1,2,2,4], [1,1,2,4,4], [1,1,2,4,8], [1,2,2,2,2], [1,2,2,2,4], [1,2,2,2,8], [1,2,2,4,4], [1,2,2,4,8], [1,2,4,4,4], [1,2,4,4,8], [1,2,4,8,8], [1,2,4,8,16].
MAPLE
b:= proc(n, t) option remember; `if`(n=0, [1, 0],
`if`(t=0, 0, (p-> p+[0, p[2]])(b(n, iquo(t, 2)))+
(p-> p+[0, p[1]])(b(n-1, t+1))))
end:
a:= n-> b(n, 1)[2]:
seq(a(n), n=0..30);
MATHEMATICA
b[n_, t_] := b[n, t] = If[n == 0, {1, 0}, If[t == 0, {0, 0},
With[{p = b[n, Quotient[t, 2]]}, p + {0, p[[2]]}] +
With[{p = b[n - 1, t + 1]}, p + {0, p[[1]]}]]];
a[n_] := b[n, 1][[2]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 29 2021
STATUS
approved