OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2169
EXAMPLE
a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [0,2].
a(3) = 4: [1,2,0], [0,2,1], [3,0,0], [0,0,3].
a(4) = 7: [1,2,1,0], [1,0,1,2], [3,0,1,0], [1,0,3,0], [0,2,0,2], [0,4,0,0], [0,0,0,4].
MAPLE
b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
add(`if`(j=0 or (t-j)::even, b(n-j, t-1), 0), j=0..n))
end:
a:= n-> b(n$2):
seq(a(n), n=0..33);
MATHEMATICA
b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
Sum[If[j == 0 || EvenQ[t - j], b[n - j, t - 1], 0], {j, 0, n}]];
a[n_] := b[n, n];
Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 20 2021
STATUS
approved