OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
G.f.: (x^8-x^6+2*x^4-x^2+1)/(1+x^2)^2/(-1+x^2)^2/(1+x)^2/(-1+x)^2 (not simplified).
G.f.: (x^2-x+1)*(x^2+1) / ((x-1)^4*(x+1)^2). [Colin Barker, Jan 31 2013]
a(n) = n*(2*n^2-9*(-1)^n+13)/24. [Bruno Berselli, Jan 31 2013]
EXAMPLE
1+x^2+5*x^4+6*x^6+15*x^8+19*x^10+35*x^12+44*x^14+69*x^16+...
MATHEMATICA
CoefficientList[Series[(x^2 - x + 1) (x^2 + 1)/((x - 1)^4 (x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 19 2013 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {1, 1, 5, 6, 15, 19}, 50] (* Harvey P. Dale, May 05 2022 *)
PROG
(PARI) select(n->n, Vec((x^8-x^6+2*x^4-x^2+1)/(1+x^2)^2/(-1+x^2)^2/(1+x)^2/(-1+x)^2+O(x^99))) \\ Charles R Greathouse IV, Sep 24 2012
(Magma) [(n+1)*(2*n^2+4*n+15+9*(-1)^n)/24: n in [0..50]]; // Vincenzo Librandi, Oct 19 2013
KEYWORD
nonn,easy
AUTHOR
STATUS
approved