OFFSET
0,1
COMMENTS
It seems that aside from a(2) the sequence is nonnegative.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, 1, 4, 1, 0, -1).
FORMULA
a(n) = a(n-2) + 4*a(n-3) + a(n-4) - a(n-6), a(0)=4, a(1)=2, a(2)=-2, a(3)=12, a(4)=12, a(5)=10.
O.g.f.: (4 + 2*x - 6*x^2 - 6*x^3 + 2*x^4 + 4*x^5)/(1 - x^2 - 4*x^3 - x^4 + x^6).
MATHEMATICA
CoefficientList[Series[(4+2x-6x^2-6x^3+2x^4+4x^5)/(1-x^2-4x^3-x^4+x^6), {x, 0, 40}], x]
PROG
(PARI) my(x='x+O('x^40)); Vec((4+2*x-6*x^2-6*x^3+2*x^4+4*x^5)/(1-x^2 -4*x^3-x^4+x^6)) \\ G. C. Greubel, Apr 21 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (4+2*x-6*x^2-6*x^3+2*x^4+4*x^5)/(1-x^2-4*x^3-x^4+x^6) )); // G. C. Greubel, Apr 21 2019
(Sage) ((4+2*x-6*x^2-6*x^3+2*x^4+4*x^5)/(1-x^2-4*x^3-x^4+x^6)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 21 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Sep 14 2002
STATUS
approved