OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2417
FORMULA
a(n) = A203717(n,ceiling(n/2)).
MAPLE
b:= proc(u, o, k) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, k), j=1..min(1, u))+
add(b(u+j-1, o-j, k), j=1..min(k, o)))
end:
a:= n-> `if`(n=0, 1, (j-> b(0, n, j)-b(0, n, j-1))(ceil(n/2))):
seq(a(n), n=0..35);
MATHEMATICA
b[u_, o_, k_] := b[u, o, k] = If[u + o == 0, 1,
Sum[b[u - j, o + j - 1, k], {j, 1, Min[1, u]}] +
Sum[b[u + j - 1, o - j, k], {j, 1, Min[k, o]}]];
a[n_] := If[n == 0, 1, With[{j = Ceiling[n/2]}, b[0, n, j]-b[0, n, j-1]]];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 20 2018
STATUS
approved