login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A118405
Row sums of triangle A118404.
3
1, 0, 0, -2, 4, -6, 12, -26, 52, -102, 204, -410, 820, -1638, 3276, -6554, 13108, -26214, 52428, -104858, 209716, -419430, 838860, -1677722, 3355444, -6710886, 13421772, -26843546, 53687092, -107374182, 214748364, -429496730, 858993460, -1717986918, 3435973836, -6871947674
OFFSET
0,4
FORMULA
G.f.: A(x) = (1+x)^2/(1+x^2)/(1+2*x).
From Paul Curtz, Oct 31 2018: (Start)
a(n) + a(n+2) = 1, -2, 4, -8, ... = A122803(n).
a(2n+2) = -2*a(2n+1) = 4*A015521(n). (End)
a(n) = -2a(n-1) - a(n-2) - 2a(n-3). - Charles R Greathouse IV, Nov 06 2018
5*a(n) = (-2)^n + 2*A056594(n-1) + 4*A056594(n). - R. J. Mathar, Jan 27 2021
MAPLE
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
MATHEMATICA
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 *)
LinearRecurrence[{-2, -1, -2}, {1, 0, 0}, 40] (* Harvey P. Dale, Aug 31 2020 *)
PROG
(PARI) a(n)=polcoeff((1+x)^2/(1+x^2)/(1+2*x+x*O(x^n)), n, x)
(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
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul D. Hanna, Apr 27 2006
STATUS
approved