[go: up one dir, main page]

login
A147564
Triangle, T(n, k) = coefficients [x^k]( p(x, n) ), where p(x, n) = (1+x)^n +2*x*[n=2] for n < 3, otherwise (1+x)^n + 2*(n*x+1)*(1+x)^(n-2) -2, read by rows.
1
1, 1, 1, 1, 4, 1, 1, 11, 9, 1, 1, 16, 24, 12, 1, 1, 21, 46, 42, 15, 1, 1, 26, 75, 100, 65, 18, 1, 1, 31, 111, 195, 185, 93, 21, 1, 1, 36, 154, 336, 420, 308, 126, 24, 1, 1, 41, 204, 532, 826, 798, 476, 164, 27, 1, 1, 46, 261, 792, 1470, 1764, 1386, 696, 207, 30, 1
OFFSET
0,5
FORMULA
T(n, k) = coefficients [x^k]( p(x, n) ), where p(x, n) = (1+x)^n + 2*(1+x)^(n-1) + 2*(n-1)*x*(1+x)^(n-2) for n > 2, p(x, 0) = 1, p(x, 1) = 1 + x, p(x, 2) = 1 + 4*x + x^2.
T(n, k) = [x^k]( p(x, n) ), where p(x, n) = (1+x)^n +2*x*[n=2] for n < 3, otherwise (1+x)^n + 2*(n*x+1)*(1+x)^(n-2) -2. - G. C. Greubel, Oct 27 2022
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 11, 9, 1;
1, 16, 24, 12, 1;
1, 21, 46, 42, 15, 1;
1, 26, 75, 100, 65, 18, 1;
1, 31, 111, 195, 185, 93, 21, 1;
1, 36, 154, 336, 420, 308, 126, 24, 1;
1, 41, 204, 532, 826, 798, 476, 164, 27, 1;
1, 46, 261, 792, 1470, 1764, 1386, 696, 207, 30, 1;
1, 51, 325, 1125, 2430, 3486, 3402, 2250, 975, 255, 33, 1;
MATHEMATICA
p[x_, n_]= (1+x)^n +If[n>=1, -2 +2*(1+x)^(n-1), 0] +If[n>2, 2*(n-1)*x*(1+x)^(n- 2), 0];
Table[CoefficientList[p[x, n], x], {n, 0, 10}]//Flatten
PROG
(Magma) // As a triangle
function p(n, x)
if n le 1 then return (1+x)^n;
elif n eq 2 then return 1 +4*x +x^2;
else return (1+x)^n +2*(n*x+1)*(1+x)^(n-2) -2;
end if; return p;
end function;
R<x>:=PowerSeriesRing(Integers(), 30);
[Coefficients(R!( p(n, x) )): n in [0..12]]; // G. C. Greubel, Oct 27 2022
(SageMath)
def p(n, x): return (1+x)^n +2*x*int(n==2) if (n<3) else (1+x)^n +2*(n*x+1)*(1+x)^(n-2) -2
flatten([[( p(n, x) ).series(x, n+1).list()[k] for k in range(n+1)] for n in (0..12)]) # G. C. Greubel, Oct 27 2022
CROSSREFS
Sequence in context: A232774 A331969 A203860 * A090981 A087903 A287532
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Nov 07 2008
EXTENSIONS
Edited by G. C. Greubel, Oct 27 2022
STATUS
approved