OFFSET
1,2
COMMENTS
Sum of the areas of all rectangles with odd side lengths r and s such that r + s = 2n. - Wesley Ivan Hurt, Apr 21 2020
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = (4*n^3 + 3*n^2 + 2*n - 3*n^2*(-1)^n)/12. - Luce ETIENNE, Jan 17 2015
G.f.: x*(3*x^4 + 2*x^3 + 8*x^2 + 2*x + 1) / ((x-1)^4*(x+1)^3). - Colin Barker, Jan 17 2015
a(n) = Sum_{i=1..n} i * (2*n-i) * (i mod 2). - Wesley Ivan Hurt, Apr 21 2020
E.g.f.: (x/6)*( 2*(3 + 3*x + x^2)*cosh(x) + (3 + 9*x + 2*x^2)*sinh(x) ). - G. C. Greubel, Jul 12 2022
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 3, 14, 22, 55, 73, 140}, 50] (* Harvey P. Dale, Aug 30 2021 *)
PROG
(PARI) Vec(x*(3*x^4+2*x^3+8*x^2+2*x+1)/((x-1)^4*(x+1)^3) + O(x^100)) \\ Colin Barker, Jan 17 2015
(PARI) odd(n) = 2*n-1;
a(n) = sum(j=1, (n+1)\2, odd(j)*odd(n+1-j)); \\ Michel Marcus, Jan 17 2015
(Magma) [(4*n^3 +3*n^2 +2*n -3*n^2*(-1)^n)/12: n in [1..50]]; // G. C. Greubel, Jul 12 2022
(SageMath) [(4*n^3 +3*n^2 +2*n -3*n^2*(-1)^n)/12 for n in (1..50)] # G. C. Greubel, Jul 12 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved