OFFSET
0,3
COMMENTS
A007310 is a subsequence.
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (2,-1,-2,4,-2,-1,2,-1).
FORMULA
a(n) = (n/2)*A028356(n).
G.f.: x*(1+x+x^2-x^3+x^4+x^5+x^6)/((1-x)^2*(1+x)^2*(1-x+x^2)^2).
a(-n) = -a(n). a(n) = 2*a(n-1)-a(n-2)-2*a(n-3)+4*a(n-4)-2*a(n-5)-a(n-6)+2*a(n-7)-a(n-8) for n>7.
a(n) = n*(5-2*(-1)^floor((n+1)/3)-(-1)^n)/4.
MATHEMATICA
CoefficientList[Series[x (1 + x + x^2 - x^3 + x^4 + x^5 + x^6) / ((1 - x)^2 (1 + x)^2 (1 - x + x^2)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Aug 19 2013 *)
LinearRecurrence[{2, -1, -2, 4, -2, -1, 2, -1}, {0, 1, 3, 6, 6, 5, 3, 7}, 90] (* Harvey P. Dale, Aug 20 2017 *)
PROG
(Magma) [(n/2)*[1, 2, 3, 4, 3, 2][n mod 6 + 1]: n in [0..68]]; /* Other: */ [n*(5-2*(-1)^Floor((n+1)/3)-(-1)^n)/4: n in [0..68]];
CROSSREFS
KEYWORD
AUTHOR
Bruno Berselli, Mar 11 2011
STATUS
approved