OFFSET
0,5
COMMENTS
[] is an Iverson bracket.
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
Wikipedia, Iverson bracket
FORMULA
EXAMPLE
Triangle T(n,k) begins:
1;
1, 1;
1, 4, 2;
1, 15, 18, 6;
1, 64, 132, 96, 24;
1, 325, 980, 1140, 600, 120;
1, 1956, 7830, 12720, 10440, 4320, 720;
1, 13699, 68502, 143850, 162120, 103320, 35280, 5040;
...
MAPLE
T:= proc(n, k) option remember;
`if`(0<k and k<=n, n*(T(n-1, k-1)+T(n-1, k)), 0)+
`if`(k=0 and n>=0, 1, 0)
end:
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
T[n_ /; n >= 0, k_ /; k >= 0] := T[n, k] = Boole[0 < k <= n]*n*(T[n-1, k-1] + T[n-1, k]) + Boole[k == 0 && n >= 0];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 09 2021 *)
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Sep 12 2019
STATUS
approved