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.

A085287 Expansion of g.f. (1+4*x)/((1-x)*(1+x)*(1-3*x)).

Original entry on oeis.org

1, 7, 22, 70, 211, 637, 1912, 5740, 17221, 51667, 155002, 465010, 1395031, 4185097, 12555292, 37665880, 112997641, 338992927, 1016978782, 3050936350, 9152809051, 27458427157, 82375281472, 247125844420, 741377533261, 2224132599787, 6672397799362, 20017193398090
Offset: 0

Views

Author

Paul Barry, Jun 26 2003

Keywords

Comments

Binomial transform of A084431.

Crossrefs

Cf. A084431.

Programs

  • Magma
    [(-10-3*(-1)^n+21*3^n)/8: n in [0..30]]; // Vincenzo Librandi, Nov 16 2011
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+3*a[n-2]+5 od: seq(a[n], n=1..33); # Zerinvary Lajos, Dec 14 2008
  • Mathematica
    LinearRecurrence[{3,1,-3},{1,7,22},30] (* Harvey P. Dale, Sep 22 2023 *)
  • PARI
    Vec((1+4*x)/((1-x^2)*(1-3*x)) + O(x^30)) \\ Michel Marcus, Aug 14 2017

Formula

a(n) = (-10 - 3(-1)^n + 21*3^n)/8.
a(n) = 2*a(n-1) + 3*a(n-2) + 5, a(0)=0, a(1)=1. - Zerinvary Lajos, Dec 14 2008
From Stefano Spezia, Sep 20 2023: (Start)
a(n) = 3*a(n-1) + a(n-2) - 3*a(n-3) for n > 2.
E.g.f.: exp(x)*(9*cosh(2*x) + 12*sinh(2*x) - 5)/4. (End)