OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..400
EXAMPLE
a(2) = 1: 12.
a(3) = 4: 132, 213, 231, 312.
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, t,
add(b(u-j, o+j-1, t), j=1..u)+
add(b(u+j-1, o-j, 1-t), j=1..o))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..25);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, t,
Sum[b[u - j, o + j - 1, t], {j, 1, u}] +
Sum[b[u + j - 1, o - j, 1 - t], {j, 1, o}]];
a[n_] := b[n, 0, 0];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 01 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 29 2015
STATUS
approved