OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(n) = 8^(n mod 2 - 1)*n*(n + 6).
G.f.: x*(7 + 2*x + 6*x^2 - x^3 - 5*x^4)/(1 - x^2)^3. - Bruno Berselli, Oct 01 2012
From Colin Barker, Jan 27 2016: (Start)
a(n) = (9 - 7*(-1)^n)*n*(n + 6)/16.
a(n) = (n^2 + 6*n)/8 for n even.
a(n) = n^2 + 6*n for n odd. (End)
Sum_{n>=1} 1/a(n) = 133/90. - Amiram Eldar, Aug 12 2022
MATHEMATICA
a[n_] := 8^(Mod[n, 2] - 1)*n*(n + 6); Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 01 2012 *)
CoefficientList[Series[x*(7 + 2*x + 6*x^2 - x^3 - 5*x^4)/(1 - x^2)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Dec 15 2012 *)
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 7, 2, 27, 5, 55}, 60] (* Harvey P. Dale, Sep 14 2022 *)
PROG
(PARI) concat(0, Vec(x*(7+2*x+6*x^2-x^3-5*x^4)/((1-x)^3*(1+x)^3) + O(x^100))) \\ Colin Barker, Jan 27 2016
(PARI) vector(50, n, n--; (9-7*(-1)^n)/16*n*(n+6)) \\ G. C. Greubel, Sep 21 2018
(Magma) [(9-7*(-1)^n)/16*n*(n+6): n in [0..50]]; // G. C. Greubel, Sep 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jean-François Alcover, Oct 01 2012
STATUS
approved