OFFSET
0,5
FORMULA
T(n, k) = k * T(n-1, k-1) + (4*n - 4 + 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 read by rows:
[0] 1;
[1] 0, 1;
[2] 0, 5, 2;
[3] 0, 45, 30, 6;
[4] 0, 585, 510, 180, 24;
[5] 0, 9945, 10350, 4950, 1200, 120;
[6] 0, 208845, 247590, 144900, 48600, 9000, 720;
[7] 0, 5221125, 6855030, 4655070, 1940400, 504000, 75600, 5040;
MAPLE
PROG
(Python)
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) + (4*n - 4 + 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