OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4,1).
FORMULA
G.f.: (-1+6*x-3*x^2)/((1-x)*(1-3*x+x^2)).
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
a(n) = (-2+(2^(-1-n)*((3-sqrt(5))^n*(-5+sqrt(5))+(3+sqrt(5))^n*(5+sqrt(5))))/sqrt(5)). - Colin Barker, Nov 03 2016
MATHEMATICA
Table[LucasL[n] - 2, {n, 1, 70, 2}] (* or *) LinearRecurrence[{4, -4, 1}, {-1, 2, 9}, 40]
PROG
(Magma) [Lucas(n)-2: n in [1..70 by 2]];
(PARI) Vec((-1+6*x-3*x^2)/((1-x)*(1-3*x+x^2)) + O(x^40)) \\ Colin Barker, Nov 03 2016
(PARI) L(n) = round(((1+sqrt(5))/2)^n + ((1-sqrt(5))/2)^n)
vector(30, n, n--; L(2*n+1)-2) \\ Colin Barker, Nov 03 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vincenzo Librandi, Mar 20 2015
EXTENSIONS
Incorrect comment about A004146 removed by Georg Fischer, Sep 04 2020
STATUS
approved