OFFSET
0,2
COMMENTS
Partial sums of A038620.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,2,-4,2,-1,2,-1).
FORMULA
a(0)=1, a(1)=4; for n>=2: if n == 0 (mod 3), a(n) = (4*n^3 + 6*n^2 + 15*n - 9)/9; if n == 1 (mod 3), a(n) = (4*n^3 + 6*n^2 + 18*n - 10)/9; if n == 2 (mod 3), a(n) = (4*n^3 + 6*n^2 + 15*n + 4)/9.
G.f.: (x+1)*(2*x^8-4*x^7+3*x^6-x^5+6*x^4+2*x^3+2*x^2+x+1) / ((x-1)^4*(x^2+x+1)^2). - Colin Barker, May 10 2013
MATHEMATICA
CoefficientList[Series[(x + 1) (2 x^8 - 4 x^7 + 3 x^6 - x^5 + 6 x^4 + 2 x^3 + 2 x^2 + x + 1)/((x - 1)^4 (x^2 + x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 22 2013 *)
LinearRecurrence[{2, -1, 2, -4, 2, -1, 2, -1}, {1, 4, 10, 22, 46, 81, 129, 198, 284, 392}, 50] (* Harvey P. Dale, Sep 03 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Colin Barker, May 10 2013
STATUS
approved