login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 2

%I #28 Sep 08 2022 08:45:33

%S 0,1,3,9,25,73,211,609,1761,5089,14707,42505,122841,355017,1026019,

%T 2965249,8569729,24766977,71577891,206863945,597847897,1727812489,

%U 4993470771,14431398369,41707515361,120536956513,348358269715,1006774084809,2909631106713,8408989965961

%N 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.

%H G. C. Greubel, <a href="/A138574/b138574.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,2,-1).

%F 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... .

%F 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

%F Lim_{n -> inf} a(n)/a(n-1) = A318605. - _A.H.M. Smeets_, Sep 12 2018

%p 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

%t LinearRecurrence[{2, 2, 2, -1}, {0, 1, 3, 9, 25}, 50] (* _G. C. Greubel_, Aug 08 2017 *)

%t 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 *)

%o (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

%o (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

%Y Cf. A071101.

%K nonn

%O 0,3

%A _Benoit Cloitre_, May 12 2008

%E Terms corrected by _Colin Barker_, Jun 28 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)