login
A084612
Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1 + x - 2*x^2)^n.
3
1, 1, 1, -2, 1, 2, -3, -4, 4, 1, 3, -3, -11, 6, 12, -8, 1, 4, -2, -20, 1, 40, -8, -32, 16, 1, 5, 0, -30, -15, 81, 30, -120, 0, 80, -32, 1, 6, 3, -40, -45, 126, 141, -252, -180, 320, 48, -192, 64, 1, 7, 7, -49, -91, 161, 357, -363, -714, 644, 728, -784, -224, 448, -128, 1, 8, 12, -56, -154, 168, 700, -328, -1791, 656, 2800
OFFSET
0,4
LINKS
FORMULA
From G. C. Greubel, Mar 25 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n,k-j)*binomial(k-j,j)*(-2)^j, for 0 <= k <= 2*n.
T(n, 2*n) = (-2)^n.
T(n, 2*n-1) = (-1)^(n-1)*A001787(n), n >= 1.
Sum_{k=0..2*n} T(n, k) = A000007(n).
Sum_{k=0..2*n} (-1)^k*T(n, k) = (-2)^n. (End)
EXAMPLE
Triangle begins:
1;
1, 1, -2;
1, 2, -3, -4, 4;
1, 3, -3, -11, 6, 12, -8;
1, 4, -2, -20, 1, 40, -8, -32, 16;
1, 5, 0, -30, -15, 81, 30, -120, 0, 80, -32;
1, 6, 3, -40, -45, 126, 141, -252, -180, 320, 48, -192, 64;
MATHEMATICA
T[n_, k_]:= Sum[Binomial[n, k-j]*Binomial[k-j, j]*(-2)^j, {j, 0, k}];
Table[T[n, k], {n, 0, 12}, {k, 0, 2*n}]//Flatten (* G. C. Greubel, Mar 25 2023 *)
PROG
(PARI) {T(n, k)=polcoeff((1+x-2*x^2)^n, k)}
for(n=0, 10, for(k=0, 2*n, print1(T(n, k), ", ")); print(""))
(Magma)
A084612:= func< n, k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-2)^j: j in [0..k]]) >;
[A084612(n, k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 25 2023
(SageMath)
def A084612(n, k): return sum(binomial(n, k-j)*binomial(k-j, j)*(-2)^j for j in range(k+1))
flatten([[A084612(n, k) for k in range(2*n+1)] for n in range(13)]) # G. C. Greubel, Mar 25 2023
KEYWORD
sign,tabf
AUTHOR
Paul D. Hanna, Jun 01 2003
STATUS
approved