%I #50 May 19 2023 07:37:25
%S 0,0,2,6,18,36,72,120,200,300,450,630,882,1176,1568,2016,2592,3240,
%T 4050,4950,6050,7260,8712,10296,12168,14196,16562,19110,22050,25200,
%U 28800,32640,36992,41616,46818,52326,58482,64980,72200,79800,88200,97020,106722
%N a(n) = (2*n^2*(n^2 - 3) - (2*n^2 + 1)*(-1)^n + 1)/64.
%C Consider the partitions of n into two parts (s,t) where s <= t. Then a(n) represents the total volume of all rectangular prisms with dimensions s, t, and |t-s|.
%C Take a chessboard of (n+1) X (n+1) unit squares in which the a1 square is black. a(n) is the number of composite rectangles of p X q unit squares whose vertices are covered by white unit squares (1 < p <= n+1, 1 < q <= n+1). For example, in a 4 X 4 chessboard there are two such rectangles (for both rectangles p=q=3) and the coordinates of their lower left vertices are a2 and b1), i.e., a(3)=2. For the number of composite rectangles whose vertices are covered by black unit squares see A317714. - _Ivan N. Ianakiev_, Aug 22 2018
%C Also the graph crossing number of the (n+2)-barbell graph (assuming Guy's conjecture). - _Eric W. Weisstein_, May 17 2023
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BarbellGraph.html">Barbell Graph</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphCrossingNumber.html">Graph Crossing Number</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-6,0,6,-2,-2,1).
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = Sum_{k=1..floor(n/2)} k * (n-k) * (n-2*k).
%F a(n) = (1/2)*floor(n/2)*(1+floor(n/2))*(floor(n/2)-n)*(1-n+floor(n/2)).
%F From _Colin Barker_, Apr 11 2018: (Start)
%F G.f.: 2*x^3*(1 + x + x^2) / ((1 - x)^5*(1 + x)^3).
%F a(n) = n^2*(n-2)*(n+2) / 32 for n even.
%F a(n) = (n^2 - 1)^2 / 32 for n odd.
%F a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8) for n>8.
%F (End)
%F a(n) = 2 * A028723(n+2). - _Alois P. Heinz_, Apr 12 2018
%F a(n) = 2 * binomial(floor((n+1)/2),2) * binomial(floor((n+2)/2),2). - _Bruno Berselli_, Apr 12 2018
%t Table[(1/2)*Floor[n/2]*(1 + Floor[n/2])*(Floor[n/2] - n)*(1 - n + Floor[n/2]), {n, 100}]
%t LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {0, 0, 2, 6, 18, 36, 72, 120}, 20] (* _Eric W. Weisstein_, May 17 2023 *)
%t Table[(1 - (-1)^n - 2 (3 + (-1)^n) n^2 + 2 n^4)/64, {n, 20}] (* _Eric W. Weisstein_, May 17 2023 *)
%t CoefficientList[Series[-2 x^2 (1 + x + x^2)/((-1 + x)^5 (1 + x)^3), {x, 0, 20}], x] (* _Eric W. Weisstein_, May 17 2023 *)
%o (Magma) [(1/2)*Floor(n/2)*(1+Floor(n/2))*(Floor(n/2)-n)*(1-n+Floor(n/2)): n in [1..45]]; // _Vincenzo Librandi_, Apr 11 2018
%Y Cf. A028723.
%Y Positive terms are the third column of the triangle in A145118.
%K nonn,easy
%O 1,3
%A _Wesley Ivan Hurt_, Apr 10 2018