OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
EXAMPLE
a(2) = 1: 12.
a(3) = 2: 132, 231.
a(4) = 3: 1432, 2431, 3421.
a(5) = 4: 15432, 25431, 35421, 45321.
a(6) = 19: 154326, 164325, 165324, 165423, 254316, 264315, 265314, 265413, 354216, 364215, 365214, 365412, 453216, 463215, 465213, 465312, 563214, 564213, 564312.
a(7) = 55: 1543267, 1643257, ..., 6753124, 6754123.
a(8) = 125: 15432678, 16432578, ..., 78641235, 78651234.
MAPLE
b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1, add(`if`(t=2*k-1,
b(o-j, u+j-1, 1, k+1), b(u+j-1, o-j, t+1, k)), j=1..o))
end:
a:= n-> b(0, n, 0, 1):
seq(a(n), n=0..35);
MATHEMATICA
b[u_, o_, t_, k_] := b[u, o, t, k] = If[u+o == 0, 1, Sum[If[t == 2*k-1, b[o-j, u+j-1, 1, k+1], b[u+j-1, o-j, t+1, k]], {j, 1, o}]];
a[n_] := b[0, n, 0, 1];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Sep 01 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,eigen
AUTHOR
Alois P. Heinz, Oct 03 2013
STATUS
approved