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.

Showing 1-3 of 3 results.

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

A106434 The (1,1)-entry of the matrix A^n, where A = [0,1;2,3].

Original entry on oeis.org

0, 2, 6, 22, 78, 278, 990, 3526, 12558, 44726, 159294, 567334, 2020590, 7196438, 25630494, 91284358, 325114062, 1157910902, 4123960830, 14687704294, 52311034542, 186308512214, 663547605726, 2363259841606, 8416874736270, 29977143892022, 106765181148606
Offset: 1

Views

Author

Roger L. Bagula, May 29 2005

Keywords

Crossrefs

Programs

  • Maple
    a[1]:=0: a[2]:=2: for n from 3 to 25 do a[n]:=3*a[n-1]+2*a[n-2] od: seq(a[n],n=1..25);
  • Mathematica
    LinearRecurrence[{3, 2}, {0, 2}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
  • PARI
    A106434(n)=([0,1;2,3]^n)[1,1] /* M. F. Hasler, Dec 01 2008 */

Formula

a(n) = 3*a(n-1) + 2*a(n-2) for n>=3; a(1)=0, a(2)=2.
O.g.f.: 2*x^2/(1-3*x-2*x^2). - R. J. Mathar, Dec 05 2007
a(n) = 2 * A007482(n-2) for n >= 2.

Extensions

Simplified definition and added cross reference. - M. F. Hasler, Dec 01 2008
Edited by N. J. A. Sloane, May 20 2006 and Dec 04 2008

A327765 a(n) is the trace of the n-th power of the 2 X 2 matrix [1 2; 3 4].

Original entry on oeis.org

2, 5, 29, 155, 833, 4475, 24041, 129155, 693857, 3727595, 20025689, 107583635, 577969553, 3105015035, 16681014281, 89615101475, 481437535937, 2586417882635, 13894964485049, 74647658190515, 401028219922673, 2154436415994395, 11574238519817321, 62180065431075395
Offset: 0

Views

Author

Adolf Cusmariu, Sep 24 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (<<0|1>, <2|5>>^n. <<2, 5>>)[1, 1]:
    seq(a(n), n=0..23);  # Alois P. Heinz, Oct 07 2019
  • Mathematica
    CoefficientList[Series[(2 - 5 x)/(1 - 5 x - 2 x^2), {x, 0, 22}], x] (* Michael De Vlieger, Sep 27 2019 *)
    LinearRecurrence[{5,2},{2,5},30] (* Harvey P. Dale, Jun 25 2020 *)
  • PARI
    a(n)={trace([1,2;3,4]^n)} \\ Andrew Howroyd, Sep 24 2019
    
  • PARI
    Vec((2 - 5*x) / (1 - 5*x - 2*x^2) + O(x^25)) \\ Colin Barker, Sep 27 2019

Formula

a(n) = trace(M^n) where M is [1, 2; 3, 4].
From Colin Barker, Sep 27 2019: (Start)
G.f.: (2 - 5*x) / (1 - 5*x - 2*x^2).
a(n) = 5*a(n-1) + 2*a(n-2) for n > 1.
a(n) = ((5-sqrt(33))/2)^n + ((5+sqrt(33))/2)^n.
(End)
Showing 1-3 of 3 results.