|
|
A154982
|
|
Triangle T(n, k, m) = coefficients of p(x, n, m) where p(x,n,m) = (x+1)*p(x, n-1, m) + 2^(m+n-1) *x*p(x, n-2, m) and m=0, read by rows.
|
|
7
|
|
|
1, 1, 1, 1, 4, 1, 1, 9, 9, 1, 1, 18, 50, 18, 1, 1, 35, 212, 212, 35, 1, 1, 68, 823, 2024, 823, 68, 1, 1, 133, 3131, 16415, 16415, 3131, 133, 1, 1, 262, 11968, 124890, 291902, 124890, 11968, 262, 1, 1, 519, 46278, 938394, 4619032, 4619032, 938394, 46278, 519, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Row sums are: {1, 2, 6, 20, 88, 496, 3808, 39360, 566144, 11208448, ...}.
|
|
LINKS
|
|
|
FORMULA
|
T(n, k, m) = coefficients of p(x, n, m) where p(x,n,m) = (x+1)*p(x, n-1, m) + 2^(m+n-1) *x*p(x, n-2, m) and m=0.
T(n, k, m) = T(n-1, k, m) + T(n-1, k-1, m) + 2^(n+m-1)*T(n-2, k-1, m) with T(n, 0, m) = T(n, n, m) = 1 and m=0. - G. C. Greubel, Mar 01 2021
|
|
EXAMPLE
|
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 9, 9, 1;
1, 18, 50, 18, 1;
1, 35, 212, 212, 35, 1;
1, 68, 823, 2024, 823, 68, 1;
1, 133, 3131, 16415, 16415, 3131, 133, 1;
1, 262, 11968, 124890, 291902, 124890, 11968, 262, 1;
1, 519, 46278, 938394, 4619032, 4619032, 938394, 46278, 519, 1;
|
|
MATHEMATICA
|
(* First program *)
p[x_, n_, m_]:= p[x, n, m] = If[n<2, n*x+1, (x+1)*p[x, n-1, m] + 2^(m+n-1)*x*p[x, n-2, m]];
Table[CoefficientList[ExpandAll[p[x, n, 0]], x], {n, 0, 12}]//Flatten (* modified by G. C. Greubel, Mar 01 2021 *)
(* Second program *)
T[n_, k_, m_]:= T[n, k, m] = If[k==0 || k==n, 1, T[n-1, k, m] + T[n-1, k-1, m] + 2^(n+m-1)*T[n-2, k-1, m]];
Table[T[n, k, 0], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 01 2021 *)
|
|
PROG
|
(Sage)
def T(n, k, m):
if (k==0 or k==n): return 1
else: return T(n-1, k, m) + T(n-1, k-1, m) + 2^(n+m-1)*T(n-2, k-1, m)
flatten([[T(n, k, 0) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Mar 01 2021
(Magma)
function T(n, k, m)
if k eq 0 or k eq n then return 1;
else return T(n-1, k, m) + T(n-1, k-1, m) + 2^(n+m-1)*T(n-2, k-1, m);
end if; return T;
end function;
[T(n, k, 0): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 01 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|