[go: up one dir, main page]

login
A124610
a(n) = 5*a(n-1) + 2*a(n-2), n > 1; a(0) = a(1) = 1.
4
1, 1, 7, 37, 199, 1069, 5743, 30853, 165751, 890461, 4783807, 25699957, 138067399, 741736909, 3984819343, 21407570533, 115007491351, 617852597821, 3319277971807, 17832095054677, 95799031216999, 514659346194349
OFFSET
0,3
COMMENTS
Top left element of powers of the matrix [1,2;3,4].
FORMULA
a(n)/a(n-1) tends to (sqrt(33) + 5)/2 = 5.37228132... - Gary W. Adamson, Mar 03 2008
G.f.: (1 - 4*x)/(1 - 5*x - 2*x^2). - G. C. Greubel, Oct 23 2019
EXAMPLE
a(5) = 1069 because [1,2;3,4]^5 = [1069,1558; 2337,3406].
MAPLE
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
MATHEMATICA
Table[MatrixPower[{{1, 2}, {3, 4}}, n][[1]][[1]], {n, 0, 30}]
Transpose[NestList[Flatten[{Rest[#], ListCorrelate[{2, 5}, #]}]&, {1, 1}, 40]][[1]] (* Harvey P. Dale, Mar 23 2011 *)
LinearRecurrence[{5, 2}, {1, 1}, 30] (* Harvey P. Dale, Jan 01 2014 *)
PROG
(PARI) Vec((1-4*x)/(1-5*x-2*x^2) +O('x^30)) \\ G. C. Greubel, Oct 23 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-4*x)/(1-5*x-2*x^2) )); // G. C. Greubel, Oct 23 2019
(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
(Sage)
def A124610_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-4*x)/(1-5*x-2*x^2) ).list()
A124610_list(30) # G. C. Greubel, Oct 23 2019
(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
CROSSREFS
Cf. A100638.
Sequence in context: A287808 A117130 A002807 * A002683 A319013 A362247
KEYWORD
easy,nonn
AUTHOR
Fredrik Johansson, Dec 20 2006
EXTENSIONS
Recurrence from Gary W. Adamson, Mar 03 2008
STATUS
approved