login
Row sums of triangle A118404.
3

%I #19 Jan 27 2021 06:23:02

%S 1,0,0,-2,4,-6,12,-26,52,-102,204,-410,820,-1638,3276,-6554,13108,

%T -26214,52428,-104858,209716,-419430,838860,-1677722,3355444,-6710886,

%U 13421772,-26843546,53687092,-107374182,214748364,-429496730,858993460,-1717986918,3435973836,-6871947674

%N Row sums of triangle A118404.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-1,-2).

%F G.f.: A(x) = (1+x)^2/(1+x^2)/(1+2*x).

%F From _Paul Curtz_, Oct 31 2018: (Start)

%F a(n) + a(n+2) = 1, -2, 4, -8, ... = A122803(n).

%F a(2n+2) = -2*a(2n+1) = 4*A015521(n). (End)

%F a(n) = -2a(n-1) - a(n-2) - 2a(n-3). - _Charles R Greathouse IV_, Nov 06 2018

%F 5*a(n) = (-2)^n + 2*A056594(n-1) + 4*A056594(n). - _R. J. Mathar_, Jan 27 2021

%p seq(coeff(series((1+x)^2/(1+x^2)/(1+2*x),x,n+1), x, n), n = 0 .. 35); # _Muniru A Asiru_, Oct 31 2018

%t Total /@ Table[SeriesCoefficient[(-1)^k/((1 + x^2) (1 + x)^(k - 1)), {x, 0, n - k}], {n, 0, 35}, {k, 0, n}] (* _Michael De Vlieger_, Oct 31 2018 *)

%t LinearRecurrence[{-2,-1,-2},{1,0,0},40] (* _Harvey P. Dale_, Aug 31 2020 *)

%o (PARI) a(n)=polcoeff((1+x)^2/(1+x^2)/(1+2*x+x*O(x^n)),n,x)

%o (PARI) a(n)=([0,1,0; 0,0,1; -2,-1,-2]^n*[1;0;0])[1,1] \\ _Charles R Greathouse IV_, Nov 06 2018

%Y Cf. A118404, A118406.

%Y Cf. A015521, A122803.

%K sign,easy

%O 0,4

%A _Paul D. Hanna_, Apr 27 2006