login
A257621
Triangle read by rows: T(n, k) = t(n-k, k), where t(0,0) = 1, t(n,m) = 0 if n < 0 or m < 0, else t(n,m) = f(m)*t(n-1,m) + f(n)*t(n,m-1), and f(n) = 4*n + 3.
9
1, 3, 3, 9, 42, 9, 27, 393, 393, 27, 81, 3156, 8646, 3156, 81, 243, 23631, 142446, 142446, 23631, 243, 729, 171006, 2015895, 4273380, 2015895, 171006, 729, 2187, 1216725, 26107983, 102402705, 102402705, 26107983, 1216725, 2187, 6561, 8584872, 320039388, 2136524184, 3891302790, 2136524184, 320039388, 8584872, 6561
OFFSET
0,2
FORMULA
T(n, k) = t(n-k, k), where t(0,0) = 1, t(n,m) = 0 if n < 0 or m < 0, else t(n,m) = f(m)*t(n-1,m) + f(n)*t(n,m-1), and f(n) = 4*n + 3.
Sum_{k=0..n} T(n, k) = A000407(n).
From G. C. Greubel, Mar 01 2022: (Start)
t(k, n) = t(n, k).
T(n, n-k) = T(n, k).
t(0, n) = T(n, 0) = A000244(n). (End)
EXAMPLE
Array t(n,k) begins as:
1, 3, 9, 27, 81, ...;
3, 42, 393, 3156, 23631, ...;
9, 393, 8646, 142446, 2015895, ...;
27, 3156, 142446, 4273380, 102402705, ...;
81, 23631, 2015895, 102402705, 3891302790, ...;
243, 171006, 26107983, 2136524184, 123074809242, ...;
729, 1216725, 320039388, 40688926236, 3437022383970, ...;
Triangle T(n,k) begins as:
1;
3, 3;
9, 42, 9;
27, 393, 393, 27;
81, 3156, 8646, 3156, 81;
243, 23631, 142446, 142446, 23631, 243;
729, 171006, 2015895, 4273380, 2015895, 171006, 729;
2187, 1216725, 26107983, 102402705, 102402705, 26107983, 1216725, 2187;
MATHEMATICA
t[n_, k_, p_, q_]:= t[n, k, p, q] = If[n<0 || k<0, 0, If[n==0 && k==0, 1, (p*k+q)*t[n-1, k, p, q] + (p*n+q)*t[n, k-1, p, q]]];
T[n_, k_, p_, q_]= t[n-k, k, p, q];
Table[T[n, k, 4, 3], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 01 2022 *)
PROG
(Sage)
@CachedFunction
def t(n, k, p, q):
if (n<0 or k<0): return 0
elif (n==0 and k==0): return 1
else: return (p*k+q)*t(n-1, k, p, q) + (p*n+q)*t(n, k-1, p, q)
def A257621(n, k): return t(n-k, k, 4, 3)
flatten([[A257621(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 01 2022
CROSSREFS
Cf. A000407 (row sums), A142459, A257612.
Similar sequences listed in A256890.
Sequence in context: A100239 A245023 A038080 * A190960 A375959 A257623
KEYWORD
nonn,tabl
AUTHOR
Dale Gerdemann, May 09 2015
STATUS
approved