login
A024598
a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = (odd natural numbers).
3
1, 3, 14, 22, 55, 73, 140, 172, 285, 335, 506, 578, 819, 917, 1240, 1368, 1785, 1947, 2470, 2670, 3311, 3553, 4324, 4612, 5525, 5863, 6930, 7322, 8555, 9005, 10416, 10928, 12529, 13107, 14910, 15558, 17575, 18297, 20540, 21340, 23821, 24703, 27434, 28402
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
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
Cf. A143218.
Sequence in context: A255219 A226341 A024473 * A019001 A034103 A034113
KEYWORD
nonn,easy
STATUS
approved