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.

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

Original entry on oeis.org

1, 1, 7, 37, 199, 1069, 5743, 30853, 165751, 890461, 4783807, 25699957, 138067399, 741736909, 3984819343, 21407570533, 115007491351, 617852597821, 3319277971807, 17832095054677, 95799031216999, 514659346194349
Offset: 0

Views

Author

Fredrik Johansson, Dec 20 2006

Keywords

Comments

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

Examples

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

Crossrefs

Cf. A100638.

Programs

  • 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
  • Magma
    R:=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
    
  • 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 *)
  • PARI
    Vec((1-4*x)/(1-5*x-2*x^2) +O('x^30)) \\ G. C. Greubel, Oct 23 2019
    
  • Sage
    def A124610_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-4*x)/(1-5*x-2*x^2) ).list()
    A124610_list(30) # G. C. Greubel, Oct 23 2019
    

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

Extensions

Recurrence from Gary W. Adamson, Mar 03 2008