OFFSET
0,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
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)*((6n-3)*cos(n*Pi/2)+cos(n*Pi)+(6n-3)*sin(n*Pi/2)). - Wesley Ivan Hurt, Sep 24 2017
From Colin Barker, Oct 06 2017: (Start)
G.f.: x^2*(1 + x - x^2 + x^3 + x^4) / ((1 - x)^2*(1 + x)*(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)
MATHEMATICA
Table[Switch[Mod[n, 4], 2, 3 (n - 2)/4 + 1, 3, 3 (n - 3)/4 + 2, _, 0], {n, 0, 86}] (* Michael De Vlieger, Sep 25 2017 *)
PROG
(PARI) concat(vector(2), Vec(x^2*(1 + x - x^2 + x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)^2) + O(x^100))) \\ Colin Barker, Oct 06 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 20 2007
STATUS
approved