OFFSET
0,3
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
EXAMPLE
T(5,1) = 4: (1,5,4,3,2), (2,5,4,3,1), (3,5,4,2,1), (4,5,3,2,1).
Triangle T(n,k) begins:
: 0 : 1;
: 1 : 1;
: 2 : 2;
: 3 : 6;
: 4 : 24;
: 5 : 116, 4;
: 6 : 672, 48;
: 7 : 4536, 504;
: 8 : 34944, 5376;
: 9 : 302896, 59488, 496;
: 10 : 2916992, 697856, 13952;
: 11 : 30899616, 8720448, 296736;
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand(
add(b(u-j, o+j-1, [1, 3, 4, 1][t])*`if`(t=4, x, 1), j=1..u)+
add(b(u+j-1, o-j, 2), 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..15);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, Expand[
Sum[b[u - j, o + j - 1, {1, 3, 4, 1}[[t]]]*If[t==4, x, 1], {j, 1, u}]+
Sum[b[u + j - 1, o - j, 2], {j, 1, o}]]];
T[n_] := CoefficientList[b[n, 0, 1], x];
T /@ Range[0, 15] // Flatten (* Jean-François Alcover, Mar 23 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 23 2014
STATUS
approved