A162270 a(n) = ((5+sqrt(2))*(3+sqrt(2))^n + (5-sqrt(2))*(3-sqrt(2))^n)/2.
5, 17, 67, 283, 1229, 5393, 23755, 104779, 462389, 2040881, 9008563, 39765211, 175531325, 774831473, 3420269563, 15097797067, 66644895461, 294184793297, 1298594491555, 5732273396251, 25303478936621, 111694959845969
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6, -7).
Crossrefs
Cf. A162396.
Programs
-
GAP
a:=[5,17];; for n in [3..25] do a[n]:=6*a[n-1]-7*a[n-2]; od; a; # Muniru A Asiru, Sep 28 2018
-
Magma
Z
:=PolynomialRing(Integers()); N :=NumberField(x^2-2); S:=[ ((5+r)*(3+r)^n+(5-r)*(3-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 02 2009 -
Magma
I:=[5,17]; [n le 2 select I[n] else 6*Self(n-1) - 7*Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 28 2018
-
Maple
seq(coeff(series((5-13*x)/(1-6*x+7*x^2),x,n+1), x, n), n = 0..25); # Muniru A Asiru, Sep 28 2018
-
Mathematica
LinearRecurrence[{6,-7},{5,17},30] (* Harvey P. Dale, Jun 04 2016 *)
-
PARI
x='x+O('x^30); Vec((5-13*x)/(1-6*x+7*x^2)) \\ G. C. Greubel, Sep 28 2018
Formula
a(n) = 6*a(n-1) - 7*a(n-2) for n > 1; a(0) = 5, a(1) = 17.
G.f.: (5-13*x)/(1-6*x+7*x^2).
Extensions
Edited and extended beyond a(5) by Klaus Brockhaus, Jul 02 2009
Comments