OFFSET
0,8
LINKS
Alois P. Heinz, Rows n = 0..100, flattened
EXAMPLE
T(4,1) = 10: (1234,1234), (1243,1243), (1243,1342), (1324,1324), (1324,1423), (1342,1243), (1342,1342), (1423,1324), (1423,1423), (1432,1432).
T(4,2) = 8: (2134,2134), (2143,2143), (2314,2314), (2314,2413), (2341,2341), (2413,2314), (2413,2413), (2431,2431).
T(4,3) = 8: (3124,3124), (3142,3142), (3142,3241), (3214,3214), (3241,3142), (3241,3241), (3412,3412), (3421,3421).
T(4,4) = 10: (4123,4123), (4132,4132), (4132,4231), (4213,4213), (4213,4312), (4231,4132), (4231,4231), (4312,4213), (4312,4312), (4321,4321).
Triangle T(n,k) begins:
1
0, 1;
0, 1, 1;
0, 2, 2, 2;
0, 10, 8, 8, 10;
0, 88, 68, 64, 68, 88;
0, 1216, 952, 852, 852, 952, 1216;
0, 24176, 19312, 17008, 16328, 17008, 19312, 24176;
MAPLE
b:= proc(u, o, h) option remember; `if`(u+o=0, 1,
add(add(b(u-j, o+j-1, h+i-1), i=1..u+o-h), j=1..u)+
add(add(b(u+j-1, o-j, h-i), i=1..h), j=1..o))
end:
T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), b(k-1, n-k, n-k)):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1,
Sum[b[u - j, o + j - 1, h + i - 1], {i, 1, u + o - h}, {j, 1, u}] +
Sum[b[u + j - 1, o - j, h - i], {i, 1, h}, {j, 1, o}]];
T[n_, k_] := If[k == 0, If[n == 0, 1, 0], b[k - 1, n - k, n - k]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 05 2019, after Alois P. Heinz *)
CROSSREFS
AUTHOR
Alois P. Heinz, Sep 20 2015
STATUS
approved