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.

A188048 Expansion of (1 - x^2)/(1 - 3*x^2 - x^3).

Original entry on oeis.org

1, 0, 2, 1, 6, 5, 19, 21, 62, 82, 207, 308, 703, 1131, 2417, 4096, 8382, 14705, 29242, 52497, 102431, 186733, 359790, 662630, 1266103, 2347680, 4460939, 8309143, 15730497, 29388368, 55500634, 103895601, 195890270, 367187437, 691566411, 1297452581
Offset: 0

Views

Author

L. Edson Jeffery, Mar 19 2011

Keywords

Comments

Sequence is related to rhombus substitution tilings.

Crossrefs

Cf. A052931.

Programs

  • Magma
    I:=[1,0,2,1]; [n le 4 select I[n] else Self(n-1)+3*Self(n-2)-2*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 22 2015
  • Maple
    F:= gfun:-rectoproc({a(n)=3*a(n-2)+a(n-3),a(0)=1,a(1)=0,a(2)=2},a(n),remember):
    map(F, [$0..100]); # Robert Israel, Jun 21 2015
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-3x^2-x^3),{x,0,40}],x]  (* Harvey P. Dale, Mar 31 2011 *)
    LinearRecurrence[{0,3,1}, {1,0,2}, 50] (* Roman Witula, Aug 20 2012 *)
  • PARI
    abs(polsym(1-3*x+x^3,66)/3) /* Joerg Arndt, Aug 19 2012 */
    

Formula

G.f.: (1 - x^2)/(1 - 3*x^2 - x^3).
a(n) = 3*a(n-2)+a(n-3), for n>=3, with a(0)=1, a(1)=0, a(2)=2.
a(n) = a(n-1)+3*a(n-2)-2*a(n-3)-a(n-4), for n>=4, with {a(k)}={1,0,2,1}, k=0,1,2,3.
a(n) = A187497(3*n+1).
a(n) = m_(3,3), where (m_(i,j)) = (U_1)^n, i,j=1,2,3,4 and U_1 is the tridiagonal unit-primitive matrix [0, 1, 0, 0; 1, 0, 1, 0; 0, 1, 0, 1; 0, 0, 1, 1].
3*(-1)^n*a(n) = A215664(n). - Roman Witula, Aug 20 2012
a(2n) = A094831(n); a(2n+1) = A094834(n). - John Blythe Dobson, Jun 20 2015
a(n) = A052931(n)-A052931(n-2). - R. J. Mathar, Nov 03 2020
a(n) = (2^n/3)*(cos^n(Pi/9) + cos^n(5*Pi/9) + cos^n(7*Pi/9)). - Greg Dresden, Sep 24 2022