login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154985 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) + 2^(n-2)*[n>=3])*x*p(x, n-2, m) and m=1, read by rows. 4
1, 1, 1, 1, 6, 1, 1, 17, 17, 1, 1, 38, 154, 38, 1, 1, 79, 872, 872, 79, 1, 1, 160, 3991, 14064, 3991, 160, 1, 1, 321, 16791, 157575, 157575, 16791, 321, 1, 1, 642, 68312, 1451486, 4815630, 1451486, 68312, 642, 1, 1, 1283, 274394, 12266038, 107115116, 107115116, 12266038, 274394, 1283, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
COMMENTS
Row sums are: {1, 2, 8, 36, 232, 1904, 22368, 349376, 7856512, 239313664, 10534962688, ...}.
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) + 2^(n-2)*[n>=3])*x*p(x, n-2, m) and m=1.
T(n, k, m) = T(n-1, k, m) + T(n-1, k-1, m) + (2^(n+m-1) + 2^(n-2)*[n>=3])*T(n-2, k-1, m) with T(n, 0, m) = T(n, n, m) = 1 and m=1. - G. C. Greubel, Mar 01 2021
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 6, 1;
1, 17, 17, 1;
1, 38, 154, 38, 1;
1, 79, 872, 872, 79, 1;
1, 160, 3991, 14064, 3991, 160, 1;
1, 321, 16791, 157575, 157575, 16791, 321, 1;
1, 642, 68312, 1451486, 4815630, 1451486, 68312, 642, 1;
1, 1283, 274394, 12266038, 107115116, 107115116, 12266038, 274394, 1283, 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] + Boole[n>=3]*2^(n-2)*x*p[x, n-2, m] ];
Table[CoefficientList[ExpandAll[p[x, n, 1]], x], {n, 0, 10}]//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^(m+n-1) + Boole[n>=3]*2^(n-2))*T[n-2, k-1, m] ];
Table[T[n, k, 1], {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
elif (n<3): return T(n-1, k, m) + T(n-1, k-1, m) + 2^(n+m-1)*T(n-2, k-1, m)
else: return T(n-1, k, m) + T(n-1, k-1, m) + (2^(n+m-1) +2^(n-2))*T(n-2, k-1, m)
flatten([[T(n, k, 1) 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;
elif (n lt 3) then return T(n-1, k, m) + T(n-1, k-1, m) + 2^(n+m-1)*T(n-2, k-1, m);
else return T(n-1, k, m) + T(n-1, k-1, m) + (2^(n+m-1)+2^(n-2))*T(n-2, k-1, m);
end if; return T;
end function;
[T(n, k, 1): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 01 2021
CROSSREFS
Cf. A154983 (m=0), this sequence (m=1), A154984 (m=2).
Sequence in context: A152602 A119726 A103999 * A157275 A157268 A146959
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Jan 18 2009
EXTENSIONS
Edited by G. C. Greubel, Mar 01 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 00:58 EDT 2024. Contains 371798 sequences. (Running on oeis4.)