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!)
A124610 a(n) = 5*a(n-1) + 2*a(n-2), n > 1; a(0) = a(1) = 1. 4

%I #30 Jan 01 2024 11:53:27

%S 1,1,7,37,199,1069,5743,30853,165751,890461,4783807,25699957,

%T 138067399,741736909,3984819343,21407570533,115007491351,617852597821,

%U 3319277971807,17832095054677,95799031216999,514659346194349

%N a(n) = 5*a(n-1) + 2*a(n-2), n > 1; a(0) = a(1) = 1.

%C Top left element of powers of the matrix [1,2;3,4].

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

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

%F a(n)/a(n-1) tends to (sqrt(33) + 5)/2 = 5.37228132... - _Gary W. Adamson_, Mar 03 2008

%F G.f.: (1 - 4*x)/(1 - 5*x - 2*x^2). - _G. C. Greubel_, Oct 23 2019

%e a(5) = 1069 because [1,2;3,4]^5 = [1069,1558; 2337,3406].

%p seq(coeff(series((1-4*x)/(1-5*x-2*x^2), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 23 2019

%t Table[MatrixPower[{{1, 2}, {3, 4}}, n][[1]][[1]], {n, 0, 30}]

%t Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{2,5},#]}]&, {1,1},40]][[1]] (* _Harvey P. Dale_, Mar 23 2011 *)

%t LinearRecurrence[{5,2},{1,1},30] (* _Harvey P. Dale_, Jan 01 2014 *)

%o (PARI) Vec((1-4*x)/(1-5*x-2*x^2) +O('x^30)) \\ _G. C. Greubel_, Oct 23 2019

%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-4*x)/(1-5*x-2*x^2) )); // _G. C. Greubel_, Oct 23 2019

%o (Magma) [n le 2 select 1 else 5*Self(n-1) + 2*Self(n-2):n in [1..22]];// _Marius A. Burtea_, Oct 24 2019

%o (Sage)

%o def A124610_list(prec):

%o P.<x> = PowerSeriesRing(ZZ, prec)

%o return P( (1-4*x)/(1-5*x-2*x^2) ).list()

%o A124610_list(30) # _G. C. Greubel_, Oct 23 2019

%o (GAP) a:=[1,1];; for n in [3..30] do a[n]:=5*a[n-1]+2*a[n-2]; od; a; # _G. C. Greubel_, Oct 23 2019

%Y Cf. A100638.

%K easy,nonn

%O 0,3

%A _Fredrik Johansson_, Dec 20 2006

%E Recurrence from _Gary W. Adamson_, Mar 03 2008

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 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)