OFFSET
0,6
COMMENTS
Limit n->infinity (a(n)/n!)^(1/n) = 0.4494840644898... . - Vaclav Kotesovec, Sep 06 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
EXAMPLE
a(4) = 1: 1234.
a(5) = 4: 12354, 12453, 13452, 23451.
a(6) = 10: 123654, 124653, 125643, 134652, 135642, 145632, 234651, 235641, 245631, 345621.
a(7) = 20: 1237654, 1247653, 1257643, 1267543, 1347652, 1357642, 1367542, 1457632, 1467532, 1567432, 2347651, 2357641, 2367541, 2457631, 2467531, 2567431, 3457621, 3467521, 3567421, 4567321.
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=3,
b(o-j, u+j-1, 1), b(u+j-1, o-j, t+1)), j=1..o))
end:
a:= n-> b(0, n, 0):
seq(a(n), n=0..30);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Sum[If[t == 3, b[o - j, u + j - 1, 1], b[u + j - 1, o - j, t + 1]], {j, 1, o}]];
a[n_] := b[0, n, 0];
a /@ Range[0, 30] (* Jean-François Alcover, Dec 21 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,eigen
AUTHOR
Alois P. Heinz, Oct 02 2013
STATUS
approved