OFFSET
0,7
COMMENTS
Limit n->infinity (a(n)/n!)^(1/n) = 0.38605986196... . - Vaclav Kotesovec, Sep 06 2014
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
EXAMPLE
a(5) = 1: 12345.
a(6) = 5: 123465, 123564, 124563, 134562, 234561.
a(7) = 15: 1234765, 1235764, 1236754, 1245763, 1246753, 1256743, 1345762, 1346752, 1356742, 1456732, 2345761, 2346751, 2356741, 2456731, 3456721.
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, add(`if`(t=4,
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 == 4, 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