login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A257609
Triangle read by rows: T(n,k) = t(n-k, k); t(n,m) = f(m)*t(n-1,m) + f(n)*t(n,m-1), where f(x) = 2*x + 2.
13
1, 2, 2, 4, 16, 4, 8, 88, 88, 8, 16, 416, 1056, 416, 16, 32, 1824, 9664, 9664, 1824, 32, 64, 7680, 76224, 154624, 76224, 7680, 64, 128, 31616, 549504, 1999232, 1999232, 549504, 31616, 128, 256, 128512, 3739648, 22587904, 39984640, 22587904, 3739648, 128512, 256
OFFSET
0,2
FORMULA
T(n,k) = t(n-k, k); 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), where f(x) = 2*x + 2.
Sum_{k=0..n} T(n, k) = A002866(n).
From G. C. Greubel, Mar 21 2022: (Start)
T(n, k) = (a*k + b)*T(n-1, k) + (a*(n-k) + b)*T(n-1, k-1), with T(n, 0) = 1, a = 2, and b = 2.
T(n, n-k) = T(n, k).
T(n, 0) = A000079(n).
T(n, 1) = 2*A100575(n+1). (End)
EXAMPLE
Triangle begins as:
1;
2, 2;
4, 16, 4;
8, 88, 88, 8;
16, 416, 1056, 416, 16;
32, 1824, 9664, 9664, 1824, 32;
64, 7680, 76224, 154624, 76224, 7680, 64;
128, 31616, 549504, 1999232, 1999232, 549504, 31616, 128;
256, 128512, 3739648, 22587904, 39984640, 22587904, 3739648, 128512, 256;
MATHEMATICA
T[n_, k_, a_, b_]:= T[n, k, a, b]= If[k<0 || k>n, 0, If[n==0, 1, (a*(n-k)+b)*T[n-1, k-1, a, b] + (a*k+b)*T[n-1, k, a, b]]];
Table[T[n, k, 2, 2], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 21 2022 *)
PROG
(Magma)
function T(n, k, a, b)
if k lt 0 or k gt n then return 0;
elif k eq 0 or k eq n then return 1;
else return (a*k+b)*T(n-1, k, a, b) + (a*(n-k)+b)*T(n-1, k-1, a, b);
end if; return T;
end function;
[T(n, k, 2, 2): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 21 2022
(Sage)
def T(n, k, a, b): # A257609
if (k<0 or k>n): return 0
elif (n==0): return 1
else: return (a*k+b)*T(n-1, k, a, b) + (a*(n-k)+b)*T(n-1, k-1, a, b)
flatten([[T(n, k, 2, 2) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 21 2022
CROSSREFS
Cf. similar sequences listed in A256890.
Sequence in context: A121221 A122598 A279069 * A087783 A176190 A106241
KEYWORD
nonn,tabl
AUTHOR
Dale Gerdemann, May 03 2015
STATUS
approved