OFFSET
0,8
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
FORMULA
T(7,3) = 20: 1237654, 1247653, 1257643, 1267543, 1347652, 1357642, 1367542, 1457632, 1467532, 1567432, 2347651, 2357641, 2367541, 2457631, 2467531, 2567431, 3457621, 3467521, 3567421, 4567321.
EXAMPLE
Triangle T(n,k) begins:
1;
1, 1;
0, 1, 1;
0, 2, 1, 1;
0, 5, 3, 1, 1;
0, 16, 6, 4, 1, 1;
0, 61, 26, 10, 5, 1, 1;
0, 272, 71, 20, 15, 6, 1, 1;
0, 1385, 413, 125, 35, 21, 7, 1, 1;
MAPLE
b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1, add(`if`(t=k,
b(o-j, u+j-1, 1, k), b(u+j-1, o-j, t+1, k)), j=1..o))
end:
T:= (n, k)-> `if`(k+1>=n, 1, `if`(k=0, 0, b(0, n, 0, k))):
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
b[u_, o_, t_, k_] := b[u, o, t, k] = If[u+o == 0, 1, Sum[If[t == k, b[o-j, u+j-1, 1, k], b[u+j-1, o-j, t+1, k]], {j, 1, o}]]; t[n_, k_] := If[k+1 >= n, 1, If[k == 0, 0, b[0, n, 0, k]]]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Oct 02 2013
STATUS
approved