OFFSET
0,7
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1,1,1,1,1).
FORMULA
a(n) = (1/16)*(cos(n*Pi/2)+sin(n*Pi/2)-1)*((2n-1)*cos(n*Pi/2)-5*cos(n*Pi)+(2n-1)*sin(n*Pi/2))*(-1)^floor((n-1)/2). - Wesley Ivan Hurt, Sep 24 2017
From Colin Barker, Sep 25 2017: (Start)
G.f.: x^2*(1 + x + x^2 + x^3 + x^4) / ((1 - x)*(1 + x)^2*(1 + x^2)^2).
a(n) = -a(n-1) - a(n-2) - a(n-3) + a(n-4) + a(n-5) + a(n-6) + a(n-7) for n>6.
(End)
PROG
(PARI) concat(vector(2), Vec(x^2*(1 + x + x^2 + x^3 + x^4) / ((1 - x)*(1 + x)^2*(1 + x^2)^2) + O(x^100))) \\ Colin Barker, Sep 25 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Aug 16 2007
EXTENSIONS
One term corrected by Colin Barker, Sep 25 2017
STATUS
approved