OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,7,1).
FORMULA
a(n) = 5*a(n-1) + 7*a(n-2) + a(n-3).
G.f.: (7 - 34*x - 11*x^2) / ((1 + x)*(1 - 6*x - x^2)). - Colin Barker, Apr 18 2012
From Colin Barker, Nov 24 2017: (Start)
a(n) = (3 - sqrt(10))^n + (3 + sqrt(10))^n + 5 for n even.
a(n) = (3 - sqrt(10))^n + (3 + sqrt(10))^n - 5 for n odd.
(End)
MATHEMATICA
CoefficientList[Series[(7-34*x-11*x^2)/((1+x)*(1-6*x-x^2)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 27 2012 *)
PROG
(Magma) I:=[7, 1, 43]; [n le 3 select I[n] else 5*Self(n-1)+7*Self(n-2)+Self(n-3): n in [1..25]]; // Vincenzo Librandi, Apr 27 2012
(PARI) Vec((7 - 34*x - 11*x^2) / ((1 + x)*(1 - 6*x - x^2)) + O(x^40)) \\ Colin Barker, Nov 24 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Stephen G Penrice, Dec 19 1999
EXTENSIONS
More terms from James A. Sellers, Dec 20 1999
STATUS
approved