login
a(n) = 2*a(n-1) + 7*a(n-2) for n>1, a(0)=1, a(1)=1.
12

%I #37 Sep 08 2022 08:45:10

%S 1,1,9,25,113,401,1593,5993,23137,88225,338409,1294393,4957649,

%T 18976049,72655641,278143625,1064876737,4076758849,15607654857,

%U 59752621657,228758827313,875786006225,3352883803641,12836269650857,49142725927201

%N a(n) = 2*a(n-1) + 7*a(n-2) for n>1, a(0)=1, a(1)=1.

%C Binomial transform of expansion of cosh(sqrt(8)x) (A001018 with interpolated zeros : 1, 0, 8, 0, 64, 0, 512, 0, ...); inverse binomial transform of A084128.

%C The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 8 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(8). - _Cino Hilliard_, Sep 25 2005

%D John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.

%H G. C. Greubel, <a href="/A084058/b084058.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,7).

%F a(n) = ((1+sqrt(8))^n + (1-sqrt(8))^n)/2.

%F G.f.: (1-x)/(1-2*x-7*x^2).

%F E.g.f.: exp(x) * cosh(sqrt(8)*x).

%F a(n) = Sum_{k=0..n} A098158(n,k)*8^(n-k). - _Philippe Deléham_, Dec 26 2007

%F G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(8*k-1)/(x*(8*k+7) - 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 26 2013

%F Satisfies recurrence relation system a(n) = 2*b(n-1) - a(n-1), b(n) = 3*b(n-1) + 2*a(n-1), a(0)=1, b(0)=1. - _Ilya Gutkovskiy_, Apr 11 2017

%t a[n_]:= Simplify[((1 + Sqrt[8])^n + (1 - Sqrt[8])^n)/2]; Array[a, 30, 0] (* Or *) CoefficientList[Series[(1-x)/(1-2x-7x^2), {x,0,30}], x] (* Or *) LinearRecurrence[{2, 7}, {1, 1}, 30] (* _Robert G. Wilson v_, Sep 18 2013 *)

%o (Magma) Z<x>:= PolynomialRing(Integers()); N<r8>:=NumberField(x^2-8); S:=[ ((1+r8)^n+(1-r8)^n)/2: n in [0..30] ]; [ Integers()!S[j]: j in [1..#S] ]; // _Klaus Brockhaus_, Nov 16 2008

%o (Magma) I:=[1,1]; [n le 2 select I[n] else 2*Self(n-1) +7*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Aug 01 2019

%o (PARI) my(x='x+O('x^30)); Vec((1-x)/(1-2*x-7*x^2)) \\ _G. C. Greubel_, Aug 01 2019

%o (Sage) ((1-x)/(1-2*x-7*x^2)).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Aug 01 2019

%o (GAP) a:=[1,1];; for n in [3..30] do a[n]:=2*a[n-1]+7*a[n-2]; od; a; # _G. C. Greubel_, Aug 01 2019

%Y Essentially a duplicate of A083100.

%K easy,nonn

%O 0,3

%A _Paul Barry_, May 10 2003