OFFSET
2,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = Sum_{i=1..floor(n/2)} i*(n-i+3) = -floor(n/2)*(floor(n/2)+1)*(2*floor(n/2)-3n-8)/6. - Wesley Ivan Hurt, Sep 20 2013
G.f. x^2*(4 + x - x^2) / ( (1+x)^3*(1-x)^4 ). - R. J. Mathar, Sep 25 2013
a(n) = (4*n^3+21*n^2+14*n-9+3*(n^2+6*n+3)*(-1)^n)/48. - Luce ETIENNE, Nov 14 2014
E.g.f.: (1/24)*( x*(9 + 18*x + 2*x^2)*cosh(x) + (-9 + 30*x + 15*x^2 + 2*x^3)*sinh(x) ). - G. C. Greubel, Jul 13 2022
MAPLE
seq(sum(i*(k-i+3), i=1..floor(k/2)), k=2..70); # Wesley Ivan Hurt, Sep 20 2013
MATHEMATICA
Table[-Floor[n/2] * (Floor[n/2] + 1) * (2 * Floor[n/2] - 3n - 8)/6, {n, 2, 100}] (* Wesley Ivan Hurt, Sep 20 2013 *)
CoefficientList[Series[- (- 4 - x + x^2)/((1 + x)^3 (x - 1)^4), {x, 0, 60}], x] (* Vincenzo Librandi, Oct 31 2014 *)
PROG
(Magma) [(4*n^3+21*n^2+14*n-9+3*(n^2+6*n+3)*(-1)^n)/48: n in [2..60]]; // Vincenzo Librandi, Oct 31 2014
(SageMath) [(4*n^3+21*n^2+14*n-9+3*(n^2+6*n+3)*(-1)^n)/48 for n in (2..60)] # G. C. Greubel, Jul 13 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved