OFFSET
1,3
LINKS
T. D. Noe, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (2, 97).
FORMULA
From Philippe Deléham, Dec 12 2006: (Start)
a(n) = 2*a(n-1) + 97*a(n-2), with a(0)=a(1)=1.
G.f.: (1-x)/(1-2*x-97*x^2). (End)
MATHEMATICA
Expand[Table[((1+7Sqrt[2])^n +(1-7Sqrt[2])^n)/2, {n, 0, 30}]] (* Artur Jasinski *)
LinearRecurrence[{2, 97}, {1, 1}, 30] (* T. D. Noe, Mar 28 2012 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1-x)/(1-2*x-97*x^2)) \\ G. C. Greubel, Aug 03 2019
(Magma) I:=[1, 1]; [n le 2 select I[n] else 2*Self(n-1) +97*Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 03 2019
(Sage) ((1-x)/(1-2*x-97*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
(GAP) a:=[1, 1];; for n in [3..30] do a[n]:=2*a[n-1]+97*a[n-2]; od; a; # G. C. Greubel, Aug 03 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 10 2006
STATUS
approved