OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,4,-4,2,2,-3,1).
FORMULA
a(n) = (28*n^4+36*n^3+18*n^2+12*n+(1-(-1)^n))/16 for n even.
a(n) = (28*n^4+92*n^3+114*n^2+68*n+17-(-1)^n)/16 for n odd.
a(n) = (14*n^4+36*n^3+36*n^2+42*n+11+3*(2*n-1)*(-1)^n-8*(-1)^(((2*n-1+(-1)^n))/4))/128.
G.f.: x*(1+x+x^2)*(1+2*x+x^2+3*x^3) / ((1-x)^5*(1+x)^2*(1+x^2)). - Colin Barker, Jul 18 2016
MATHEMATICA
{0}~Join~Accumulate@ CoefficientList[Series[(1 + x + x^2) (1 + 2 x + x^2 + 3 x^3)/((1 - x)^2 (1 - x^2) (1 - x^4)), {x, 0, 49}], x] (* Michael De Vlieger, Jul 18 2016, after Wesley Ivan Hurt at A064412, or *)
Table[(14 n^4 + 36 n^3 + 36 n^2 + 42 n + 11 + 3 (2 n - 1) (-1)^n - 8 (-1)^(((2 n - 1 + (-1)^n))/4))/128, {n, 50}] (* Michael De Vlieger, Jul 18 2016 *)
LinearRecurrence[{3, -2, -2, 4, -4, 2, 2, -3, 1}, {0, 1, 6, 20, 52, 112, 215, 375, 613}, 60] (* Harvey P. Dale, Jun 19 2022 *)
PROG
(PARI) concat(0, Vec(x*(1+x+x^2)*(1+2*x+x^2+3*x^3)/((1-x)^5*(1+x)^2*(1+x^2)) + O(x^50))) \\ Colin Barker, Jul 18 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luce ETIENNE, Jul 17 2016
STATUS
approved