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.

A159336 Transform of the finite sequence (1, 0, -1) by the T_{1,0} transformation (see link).

Original entry on oeis.org

1, 2, 4, 11, 26, 60, 139, 323, 751, 1746, 4059, 9436, 21936, 50995, 118549, 275593, 640676, 1489391, 3462414, 8049136, 18711971, 43500055, 101125359, 235087938, 546513151, 1270488936, 2953528444, 6866120611, 15961793881, 37106668865
Offset: 0

Views

Author

Richard Choulet, Apr 11 2009

Keywords

Crossrefs

Cf. A034943.

Programs

  • Magma
    I:=[4, 11, 26]; [1,2] cat [n le 3 select I[n] else 3*Self(n-1) - 2*Self(n-2) + Self(n-3): n in [1..50]]; // G. C. Greubel, Jun 25 2018
  • Mathematica
    Join[{1, 2}, LinearRecurrence[{3, -2, 1}, {4, 11, 26}, 49]] (* G. C. Greubel, Jun 25 2018 *)
  • PARI
    z='z+O('z^50); Vec(((1-z)^2/(1-3*z+2*z^2-z^3))*(1-z^2)+(z/(1-3*z+2*z^2-z^3))) \\ G. C. Greubel, Jun 25 2018
    

Formula

O.g.f.: f(z) = ((1-z)^2/(1-3*z+2*z^2-z^3))*(1-z^2)+(z/(1-3*z+2*z^2-z^3)).
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-3) for n >= 5, with a(0)=1, a(1)=2, a(2)=4, a(3)=11, a(4)=26.