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.

A078042 Expansion of (1-x)/(1+x-x^2+x^3).

Original entry on oeis.org

1, -2, 3, -6, 11, -20, 37, -68, 125, -230, 423, -778, 1431, -2632, 4841, -8904, 16377, -30122, 55403, -101902, 187427, -344732, 634061, -1166220, 2145013, -3945294, 7256527, -13346834, 24548655, -45152016, 83047505, -152748176, 280947697, -516743378, 950439251, -1748130326, 3215312955
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Absolute values give coordination sequence for (3,infinity,infinity) tiling of hyperbolic plane. - N. J. A. Sloane, Dec 29 2015
a(n) is the upper left entry of the n-th power of the 3 X 3 matrix M = [-2, -2, 1; 1, 1, 0; 1, 0, 0]; a(n) = M^n [1, 1]. - Philippe Deléham, Apr 19 2023

Crossrefs

Programs

  • Magma
    [n le 3 select -n*(-1)^n else -Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]]; // Vincenzo Librandi, Dec 30 2015
  • Mathematica
    CoefficientList[Series[(1-x)/(1+x-x^2+x^3),{x,0,40}],x] (* or *) LinearRecurrence[{-1,1,-1},{1,-2,3},40] (* Harvey P. Dale, Jun 01 2012 *)
  • PARI
    Vec((1-x)/(1+x-x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    

Formula

a(n) = -a(n-1) + a(n-2) - a(n-3) for n > 2; a(0)=1, a(1)=-2, a(2)=3. - Harvey P. Dale, Jun 01 2012
a(n) = (-1)^n * A001590(n+2).
a(n) = Sum_{k=0..n} A188316(n,k)*(-2)^k. - Philippe Deléham, Apr 19 2023