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.

A138574 a(n) = 2*a(n-1) + 2*a(n-2) + 2*a(n-3) - a(n-4); a(0)=0, a(1)=1, a(2)=3, a(3)=9, a(4)=25.

Original entry on oeis.org

0, 1, 3, 9, 25, 73, 211, 609, 1761, 5089, 14707, 42505, 122841, 355017, 1026019, 2965249, 8569729, 24766977, 71577891, 206863945, 597847897, 1727812489, 4993470771, 14431398369, 41707515361, 120536956513, 348358269715, 1006774084809, 2909631106713, 8408989965961
Offset: 0

Views

Author

Benoit Cloitre, May 12 2008

Keywords

Crossrefs

Cf. A071101.

Programs

  • Magma
    I:=[0,1,3,9,25]; [n le 5 select I[n] else 2*Self(n-1)+2*Self(n-2)+2*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Sep 14 2018
  • Maple
    seq(coeff(series((x*(1+x+x^2-x^3))/(1-2*x-2*x^2-2*x^3+x^4),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Sep 12 2018
  • Mathematica
    LinearRecurrence[{2, 2, 2, -1}, {0, 1, 3, 9, 25}, 50] (* G. C. Greubel, Aug 08 2017 *)
    CoefficientList[Series[x*( 1+x+x^2-x^3 )/(1-2*x-2*x^2-2*x^3+x^4), {x, 0, 20}], x] (* Stefano Spezia, Sep 12 2018 *)
  • PARI
    x='x+O('x^50); concat([0], Vec(x*(1 +x +x^2 -x^3)/(1 -2*x -2*x^2 -2*x^3 +x^4))) \\ G. C. Greubel, Aug 08 2017
    

Formula

a(n) = round(w^n*(1 + 1/sqrt(5))/4) where w = (1+r)/(1-r) = 2.89005363826396... and r = sqrt(sqrt(5)-2) = 0.485868271756... .
G.f.: x*( 1 + x + x^2 - x^3 ) / ( 1 - 2*x - 2*x^2 - 2*x^3 + x^4 ). - R. J. Mathar, Jun 29 2013
Lim_{n -> inf} a(n)/a(n-1) = A318605. - A.H.M. Smeets, Sep 12 2018

Extensions

Terms corrected by Colin Barker, Jun 28 2013