OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
h:= proc(n) option remember; 1+ilog2(n) end:
b:= proc(n, i) option remember; `if`(n=0, [1, 0],
`if`(i<1, 0, b(n, i-1-irem(i, 2))+`if`(i::even
or i>n, 0, (p-> p+[0, p[1]*h(i)])(b(n-i, i)))))
end:
a:= n-> b(n$2)[2]:
seq(a(n), n=1..60); # Alois P. Heinz, Sep 27 2018
MATHEMATICA
h[n_] := h[n] = 1 + Floor@Log[2, n];
b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, 0, b[n, i-1-Mod[i, 2]] + If[EvenQ[i] || i>n, 0, Function[p, p + {0, p[[1]] h[i]}][b[n - i, i]]]]];
a[n_] := b[n, n][[2]];
Array[a, 60] (* Jean-François Alcover, Dec 12 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David S. Newman, Sep 11 2018
STATUS
approved