OFFSET
0,1
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-2,2,1).
FORMULA
a(n) = (-1)^n*A000032(2*n) + 2.
a(n) = -2*a(n-1) + 2*a(n-2) + a(n-3) with a(0)=4, a(1)=-1, a(2)=9.
G.f.: (4 + 7*x - x^2)/(1 + 2*x - 2*x^2 - x^3).
a(n) = (-1)^n*A001254(n). - R. J. Mathar, Jan 11 2012
a(n) = 2 + (1/2*(-3-sqrt(5)))^n + (1/2*(-3+sqrt(5)))^n. - Colin Barker, Oct 01 2016
From G. C. Greubel, Jun 14 2025: (Start)
a(n) = A219233(n) + 2 + [n=0].
E.g.f.: 2*exp(-3*x/2)*cosh(sqrt(5)*x/2) + 2*exp(x). (End)
MATHEMATICA
CoefficientList[Series[(4 + 7*x - x^2)/(1 + 2*x - 2*x^2 - x^3), {x, 0, 30}], x]
LinearRecurrence[{-2, 2, 1}, {4, -1, 9}, 50] (* Harvey P. Dale, Nov 08 2011 *)
PROG
(PARI) a(n) = round((2+(1/2*(-3-sqrt(5)))^n+(1/2*(-3+sqrt(5)))^n)) \\ Colin Barker, Oct 01 2016
(PARI) Vec((4+7*x-x^2)/(1+2*x-2*x^2-x^3) + O(x^30)) \\ Colin Barker, Oct 01 2016
(Magma)
A075150:= func< n | (-1)^n*Lucas(n)^2 >; // G. C. Greubel, Jun 14 2025
(SageMath)
def A075150(n): return (-1)**n*lucas_number2(n, 1, -1)**2 # G. C. Greubel, Jun 14 2025
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Sep 05 2002
STATUS
approved
