cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118405 Row sums of triangle A118404.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Apr 27 2006

Keywords

Crossrefs

Programs

  • 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 *)
  • 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

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