OFFSET
0,3
COMMENTS
Row sums = n!.
T(n,0) = A117158.
LINKS
Alois P. Heinz, Rows n = 0..143, flattened
P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 210
FORMULA
E.g.f.: 1/(1 - x - Sum_{k,n} I(n,k)(y - 1)^k*x^n/n!) where I(n,k) is the coefficient of y^k*x^n in the ordinary generating function expansion of y x^4/(1 - y*x - y*x^2 - y*x^3) See Flajolet and Sedgewick reference in Links section.
EXAMPLE
: 1;
: 1;
: 2;
: 6;
: 23, 1;
: 111, 8, 1;
: 642, 67, 10, 1;
: 4326, 602, 99, 12, 1;
: 33333, 5742, 1093, 137, 14, 1;
T(5,1) = 8 because we have: (4,5,3,2,1), (3,5,4,2,1), (2,5,4,3,1), (5,4,3,1,2), (1,5,4,3,2), (5,4,2,1,3), (5,3,2,1,4), (4,3,2,1,5).
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
add(b(u-j, o+j-1, 1), j=1..u)+
add(b(u+j-1, o-j, [2, 3, 3][t])*`if`(t=3, x, 1), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)):
seq(T(n), n=0..14); # Alois P. Heinz, Oct 29 2013
MATHEMATICA
nn=10; u=y-1; a=Apply[Plus, Table[Normal[Series[y x^4/(1-y x - y x^2-y x^3), {x, 0, nn}]][[n]]/(n+3)!, {n, 1, nn-3}]]/.y->u; Range[0, nn]! CoefficientList[Series[1/(1-x-a), {x, 0, nn}], {x, y}]//Grid
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Geoffrey Critzer, Dec 12 2012
STATUS
approved