A161944 a(n) = ((4+sqrt(2))*(3+sqrt(2))^n + (4-sqrt(2))*(3-sqrt(2))^n)/4.
2, 7, 28, 119, 518, 2275, 10024, 44219, 195146, 861343, 3802036, 16782815, 74082638, 327016123, 1443518272, 6371996771, 28127352722, 124160138935, 548069364556, 2419295214791, 10679285736854, 47140647917587
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- Index entries for linear recurrences with constant coefficients, signature (6,-7).
Programs
-
GAP
a:=[2,7];; for n in [3..25] do a[n]:=6*a[n-1]-7*a[n-2]; od; a; # Muniru A Asiru, Apr 04 2018
-
Magma
Z
:=PolynomialRing(Integers()); N :=NumberField(x^2-2); S:=[ ((4+r)*(3+r)^n+(4-r)*(3-r)^n)/4: n in [0..21] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009 -
Mathematica
LinearRecurrence[{6,-7}, {2,7}, 50] (* G. C. Greubel, Apr 03 2018 *) Table[((4+Sqrt[2])(3+Sqrt[2])^n+(4-Sqrt[2])(3-Sqrt[2])^n)/4,{n,0,30}]// Simplify (* Harvey P. Dale, Jun 03 2020 *)
-
PARI
x='x+O('x^30); Vec((2-5*x)/(1-6*x+7*x^2)) \\ G. C. Greubel, Apr 03 2018
Formula
a(n) = 6*a(n-1) - 7*a(n-2) for n > 1; a(0) = 2; a(1) = 7.
G.f.: (2-5*x)/(1-6*x+7*x^2).
E.g.f.: exp(3*x)*(4*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x))/2. - G. C. Greubel, Apr 03 2018
Extensions
Edited and extended beyond a(4) by Klaus Brockhaus, Jul 01 2009
Comments