OFFSET
0,5
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
FORMULA
EXAMPLE
T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,1) = 2: [1,2], [2,1].
T(2,2) = 2: [1,1], [2,2].
T(3,1) = 18: [1,1,2], [1,1,3], [1,2,1], [1,2,3], [1,3,1], [1,3,2], [2,1,2], [2,1,3], [2,2,1], [2,2,3], [2,3,1], [2,3,2], [3,1,2], [3,1,3], [3,2,1], [3,2,3], [3,3,1], [3,3,2].
T(3,2) = 6: [1,2,2], [1,3,3], [2,1,1], [2,3,3], [3,1,1], [3,2,2].
T(3,3) = 3: [1,1,1], [2,2,2], [3,3,3].
Triangle T(n,k) begins:
1;
0, 1;
0, 2, 2;
0, 18, 6, 3;
0, 192, 48, 12, 4;
0, 2500, 500, 100, 20, 5;
0, 38880, 6480, 1080, 180, 30, 6;
0, 705894, 100842, 14406, 2058, 294, 42, 7;
0, 14680064, 1835008, 229376, 28672, 3584, 448, 56, 8;
MAPLE
T:= (n, k)-> `if`(n=0 and k=0, 1, `if`(k<1 or k>n, 0,
`if`(k=n, n, (n-1)*n^(n-k)))):
seq(seq(T(n, k), k=0..n), n=0..12);
MATHEMATICA
f[0, 0]=1;
f[n_, k_]:=Which[1<=k<=n-1, n^(n-k)*(n-1), k<1, 0, k==n, n, k>n, 0];
Table[Table[f[n, k], {k, 0, n}], {n, 0, 10}]//Grid (* Geoffrey Critzer, May 19 2014 *)
CROSSREFS
KEYWORD
AUTHOR
Alois P. Heinz, Aug 19 2013
STATUS
approved