OFFSET
0,6
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-3,-1,2).
FORMULA
a(n) = (-1)^(n+1) * A027974(n-4) for n > 4.
G.f.: (1+3*x+2*x^2+x^3)/((1+2*x)*(1+x-x^2)). - R. J. Mathar, Sep 22 2008
a(n) = (-1)^(n+1)*(2^(n-1) -F(n+1) -F(n-1)), where F(n) = A000045(n), for n>=1, with a(0)=1. - Johannes W. Meijer, Aug 15 2010
a(n) = -3*a(n-1) - a(n-2) + 2*a(n-3). - Wesley Ivan Hurt, Oct 06 2017
MATHEMATICA
Table[(-1)^n*(LucasL[n] -2^(n-1)) - Boole[n==0]/2, {n, 0, 40}] (* G. C. Greubel, Apr 14 2021 *)
PROG
(Magma) [1] cat [(-1)^n*( Lucas(n) - 2^(n-1) ): n in [1..40]]; // G. C. Greubel, Apr 14 2021
(Sage) [1]+[(-1)^n*( lucas_number2(n, 1, -1) - 2^(n-1) ) for n in (1..40)] # G. C. Greubel, Apr 14 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 21 2008
EXTENSIONS
Edited and extended by R. J. Mathar, Sep 22 2008
STATUS
approved