%I #20 Mar 25 2023 08:20:52
%S 1,1,1,-3,1,2,-5,-6,9,1,3,-6,-17,18,27,-27,1,4,-6,-32,19,96,-54,-108,
%T 81,1,5,-5,-50,5,211,-15,-450,135,405,-243,1,6,-3,-70,-30,366,181,
%U -1098,-270,1890,-243,-1458,729,1,7,0,-91,-91,546,637,-2015,-1911,4914,2457,-7371,0,5103,-2187,1,8,4,-112,-182,728,1456
%N Triangle, read by rows, where the n-th row lists the (2*n+1) coefficients of (1 + x - 3*x^2)^n.
%H G. C. Greubel, <a href="/A084614/b084614.txt">Table of n, a(n) for the first 50 rows, flattened</a>
%F From _G. C. Greubel_, Mar 25 2023: (Start)
%F T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*(-3)^j, for 0 <= k <= 2*n.
%F T(n, 2*n) = (-3)^n.
%F T(n, 2*n-1) = (-1)^(n-1)*A027471(n+1), n >= 1.
%F Sum_{k=0..2*n} T(n, k) = (-1)^n.
%F Sum_{k=0..2*n} (-1)^k*T(n, k) = (-3)^n. (End)
%e Rows:
%e 1;
%e 1, 1, -3;
%e 1, 2, -5, -6, 9;
%e 1, 3, -6, -17, 18, 27, -27;
%e 1, 4, -6, -32, 19, 96, -54, -108, 81;
%e 1, 5, -5, -50, 5, 211, -15, -450, 135, 405, -243;
%e 1, 6, -3, -70, -30, 366, 181, -1098, -270, 1890, -243, -1458, 729;
%t With[{eq= (1+x-3*x^2)}, Flatten[Table[CoefficientList[Expand[eq^n], x], {n,0,13}]]] (* _G. C. Greubel_, Mar 02 2017 *)
%o (PARI) for(n=0,12, for(k=0,2*n,t=polcoeff((1+x-3*x^2)^n,k,x); print1(t",")); print(" "))
%o (Magma)
%o A084614:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*(-3)^j: j in [0..k]]) >;
%o [A084614(n,k): k in [0..2*n], n in [0..15]]; // _G. C. Greubel_, Mar 25 2023
%o (SageMath)
%o def A084614(n,k): return ( (1+x-3*x^2)^n ).series(x, 30).list()[k]
%o flatten([[A084614(n,k) for k in range(2*n+1)] for n in range(13)]) # _G. C. Greubel_, Mar 25 2023
%Y Cf. A002426, A027471, A084600 - A084613, A084615.
%K sign,tabf
%O 0,4
%A _Paul D. Hanna_, Jun 01 2003
|