OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
G.f.: x^2*(4 + 5*x + 11*x^2 + 3*x^3 + x^4)/((1 - x)^4*(1 + x)^3). - Ilya Gutkovskiy, Apr 14 2016; corrected by Colin Barker, Apr 14 2016
From Colin Barker, Apr 14 2016: (Start)
a(n) = n^2*(2*n + (-1)^n - 1)/4.
a(n) = n^3/2 for n even.
a(n) = n^2*(n-1)/2 for n odd.
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n>6. (End)
Sum_{n>=2} 1/a(n) = zeta(3)/4 - Pi^2/4 - 2*log(2) + 4. - Amiram Eldar, Mar 15 2024
MATHEMATICA
Table[n^2 Floor[n/2], {n, 0, 50}] (* Vincenzo Librandi, Apr 04 2018 *)
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {0, 0, 4, 9, 32, 50, 108}, 60] (* Harvey P. Dale, May 19 2019 *)
PROG
(Haskell)
seq' x = x^2 * (x `div` 2)
map seq' [0..50]
(PARI) a(n) = n^2*(n\2); \\ Altug Alkan, Apr 14 2016
(PARI) concat(vector(2), Vec(x^2*(4+5*x+11*x^2+3*x^3+x^4)/((1-x)^4*(1+x)^3) + O(x^50))) \\ Colin Barker, Apr 14 2016
(Magma) [n^2*Floor(n/2): n in [0..50]]; // Vincenzo Librandi, Apr 04 2018
(GAP) List([0..55], n -> n^2*Int(n/2)); # Muniru A Asiru, Apr 05 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ian Stewart, Apr 06 2016
STATUS
approved