OFFSET
0,5
FORMULA
T(n, k) = k * T(n-1, k-1) + (2*n - 2 + k) * T(n-1, k) for 0 < k < n with initial values T(n, 0) = 0 for n > 0 and T(n, n) = n! for n >= 0. - Werner Schulte, Mar 17 2024
EXAMPLE
Triangle starts:
[0] 1;
[1] 0, 1;
[2] 0, 3, 2;
[3] 0, 15, 18, 6;
[4] 0, 105, 174, 108, 24;
[5] 0, 945, 1950, 1710, 720, 120;
[6] 0, 10395, 25290, 28080, 16920, 5400, 720;
[7] 0, 135135, 374850, 497070, 383040, 176400, 45360, 5040;
MAPLE
PROG
(SageMath)
from functools import cache
@cache
def T(n, k): # after Werner Schulte
if k == 0: return 0**n
if k == n: return n * T(n-1, n-1)
return k * T(n-1, k-1) + (2*n - 2 + k) * T(n-1, k)
for n in range(8): print([T(n, k) for k in range(n + 1)])
# Peter Luschny, Mar 17 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Mar 08 2024
STATUS
approved