a(n) = (1/8)*n*(n^2 +2n 2*n + 8) if n is even; a(n) = (1/8)*(n^3 +2n 2*n^2 +7n 7*n - 2) if n is odd.
From R. J. Mathar, Sep 29 2010: (Start)
a(n) = +2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6). - _R. J. Mathar_, Sep 29 2010
G.f.: (x ^3*(1 + 2 *x - x^2 + x^4))/((-1 + - x)^4 *(1 + x)^2). - _R. J. Mathar_, Sep 29 2010(End)
a(n) = (-2 + 15*n + 4*n^2 + 2*n^3 + (-1)^n* (2 + n))/16. - Eric W. Weisstein, Sep 08 2017
CoefficientList[Series[(1 + 2 x - x^2 + x^4)/((-1 + - x)^4 (1 + x)^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 08 2017 *)
proposed
editing