OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-1).
FORMULA
For n=even: a(n) = a(n-1) + a(n-2); for n=odd: a(n) = a(n-1) + a(n-2) + 9 ; with a(0) = 0 and a(1) = 1.
From Colin Barker, Feb 18 2013: (Start)
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4) for n>3.
G.f.: x*(1+8*x^2) / ((1-x)*(1+x)*(1-x-x^2)).
(End)
a(n) = (2^(-1-n)*(-45*((-2)^n+2^n) + (45-7*sqrt(5))*(1+sqrt(5))^n + (1-sqrt(5))^n*(45+7*sqrt(5)))) / 5. - Colin Barker, Jul 13 2017
a(n) = Fibonacci(n+1) + 8*Fibonacci(n-1) - 9*((1+(-1)^n)/2). - G. C. Greubel, Apr 25 2022
MATHEMATICA
CoefficientList[Series[x*(1+8*x^2)/((1-x^2)*(1-x-x^2)), {x, 0, 50}], x] (* G. C. Greubel, Jul 13 2017 *)
PROG
(PARI) concat(0, Vec(x*(1+8*x^2)/((1-x)*(1+x)*(1-x-x^2)) + O(x^50))) \\ Colin Barker, Jul 13 2017
(Magma) [Lucas(n) +7*Fibonacci(n-1) -9*((n+1) mod 2): n in [0..50]]; // G. C. Greubel, Apr 25 2022
(Sage) [fibonacci(n+1) +8*fibonacci(n-1) -9*((n+1)%2) for n in (0..50)] # G. C. Greubel, Apr 25 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mark Dols, Jan 28 2010
EXTENSIONS
Offset corrected by Colin Barker, Feb 18 2013
STATUS
approved