OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,-1).
FORMULA
a(n) = 2*a(n-2) - a(n-3) for n >= 3. [Corrected by Georg Fischer, Sep 30 2022]
G.f.: (1 - 2*x)/(1 - 2*x^2 + x^3).
EXAMPLE
a(0) = 1;
a(1) = 1 - 3 = -2;
a(2) = 1 - 3 + 4 = 2;
a(3) = 1 - 3 + 4 - 7 = -5.
MATHEMATICA
f[n_] := Fibonacci[n]; g[n_] := LucasL[n];
f1 = Table[(-1)^n f[n] + 1, {n, 0, 40}] (* A355020 *)
g1 = Table[(-1)^n g[n] - 1, {n, 0, 40}] (* this sequence *)
LucasL[-Range[0, 50]] - 1 (* G. C. Greubel, Mar 17 2024 *)
LinearRecurrence[{0, 2, -1}, {1, -2, 2}, 40] (* Harvey P. Dale, Sep 06 2024 *)
PROG
(Magma) [Lucas(-n) -1: n in [0..50]]; // G. C. Greubel, Mar 17 2024
(SageMath) [lucas_number2(-n, 1, -1) -1 for n in range(51)] # G. C. Greubel, Mar 17 2024
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Clark Kimberling, Jun 21 2022
STATUS
approved