login
a(n) = Sum_{i=1..floor((n-1)/2)} i * (n-i)^2.
1

%I #11 Jun 22 2019 09:27:07

%S 0,0,4,9,34,57,134,196,370,500,830,1065,1624,2009,2884,3472,4764,5616,

%T 7440,8625,11110,12705,15994,18084,22334,25012,30394,33761,40460,

%U 44625,52840,57920,67864,73984,85884,93177,107274,115881,132430,142500,161770,173460

%N a(n) = Sum_{i=1..floor((n-1)/2)} i * (n-i)^2.

%C Total area of all trapezoids with height s*t, and bases s+t and t-s for positive integers s and t, n = s + t, and s < t.

%C Total volume of all rectangular prisms with dimensions s X t X t, for positive integers s and t such that n = s + t and s < t.

%C Also, total area of all rectangles with dimensions s X t^2, where s and t are positive integers, n = s + t and s < t.

%C Consider the partitions of n into two distinct parts (s,t) with s < t. Then a(n) is the sum of all the products s*t^2, using the corresponding parts from each (s,t).

%H Colin Barker, <a href="/A308038/b308038.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4,-6,6,4,-4,-1,1).

%F a(n) = (2*n+1-(-1)^n)*(2*n-3-(-1)^n)*(3*(-1+(-1)^n)*(3+(-1)^n)+4*n*(5+5*(-1)^n+11*n))/3072.

%F a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9).

%F From _Colin Barker_, Jun 22 2019: (Start)

%F G.f.: x^3*(4 + 5*x + 9*x^2 + 3*x^3 + x^4) / ((1 - x)^5*(1 + x)^4).

%F a(n) = (3 - 3*(-1)^n - 2*(17+3*(-1)^n)*n^2 - 12*(1+(-1)^n)*n^3 + 22*n^4) / 384.

%F (End)

%t Table[Sum[i*(n - i)^2, {i, Floor[(n - 1)/2]}], {n, 60}]

%o (PARI) concat([0,0], Vec(x^3*(4 + 5*x + 9*x^2 + 3*x^3 + x^4) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ _Colin Barker_, Jun 22 2019

%K nonn,easy

%O 1,3

%A _Wesley Ivan Hurt_, May 10 2019