%I #79 May 01 2024 01:10:51
%S 1,2,7,10,22,28,50,60,95,110,161,182,252,280,372,408,525,570,715,770,
%T 946,1012,1222,1300,1547,1638,1925,2030,2360,2480,2856,2992,3417,3570,
%U 4047,4218,4750,4940,5530,5740,6391,6622,7337,7590,8372,8648,9500,9800,10725,11050
%N a(n) = 1*(n) + 2*(n-1) + 3*(n-2) + ... + (n+1-k)*k, where k = floor((n+1)/2).
%C Given a rectangle of perimeter 2*n one can form rectangles having this perimeter for a number of different rectangles or squares depending on how large 2*n is. The sequence lists the total areas of all such rectangles for each 2*n. - _J. M. Bergot_, Sep 14 2011
%C Antidiagonal sums of triangle A075362. - _L. Edson Jeffery_, Jan 20 2012
%H Vincenzo Librandi, <a href="/A023855/b023855.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1)
%F a(n) = (n+1)*(n+3)*(2*n+1)/24 if n is odd, or n*(n+1)*(n+2)/12 if n is even.
%F G.f.: x*(1+x+2*x^2)/((1-x)^4*(1+x)^3). - _Ralf Stephan_, Apr 28 2004
%F a(n) = Sum_{i=1..ceiling(n/2)} i*(n-i+1) = -ceiling(n/2)*(ceiling(n/2)+1)*(2*ceiling(n/2)-3n-2)/6. - _Wesley Ivan Hurt_, Sep 19 2013
%F a(n) = (4*n^3 + 15*n^2 + 14*n + 3 - 3*(n+1)^2*(-1)^n)/48. - _Luce ETIENNE_, Oct 22 2014
%F a(n) = (A000292(n) + (n mod 2)*(ceiling(n/2))^2)/2. - _Luc Rousseau_, Feb 25 2018
%F E.g.f.: (1/24)*( x*(21+12*x+2*x^2)*cosh(x) + (3+12*x+15*x^2+2*x^3)*sinh(x) ). - _G. C. Greubel_, Jul 12 2022
%p seq(-(1/3)*floor((k+1)/2)^3 + (k/2)*floor((k+1)/2)^2 + ((3*k+2)/6)*floor((k+1)/2), k=1..100); # _Wesley Ivan Hurt_, Sep 18 2013
%t LinearRecurrence[{1,3,-3,-3,3,1,-1}, {1,2,7,10,22,28,50}, 60] (* _Vincenzo Librandi_, Jan 23 2012 *)
%t Table[-Ceiling[n/2] (Ceiling[n/2] + 1) (2 Ceiling[n/2] - 3 n - 2)/6, {n, 100}] (* _Wesley Ivan Hurt_, Sep 20 2013 *)
%o (PARI) a(n)=if(n%2, (n+1)*(n+3)*(2*n+1)/24, n*(n+1)*(n+2)/12)
%o (PARI) my(x='x+O('x^99)); Vec(x*(1+x+2*x^2)/((1-x)^4*(1+x)^3)) \\ _Altug Alkan_, Mar 03 2018
%o (Haskell)
%o a023855 n = sum $ zipWith (*) [1 .. div (n+1) 2] [n, n-1 ..]
%o -- _Reinhard Zumkeller_, Jan 23 2012
%o (Magma) [(4*n^3 +15*n^2 +14*n +3 -3*(n+1)^2*(-1)^n)/48: n in [1..60]]; // _G. C. Greubel_, Jul 12 2022
%o (SageMath) [(4*n^3 +15*n^2 +14*n +3 -3*(n+1)^2*(-1)^n)/48 for n in (1..60)] # _G. C. Greubel_, Jul 12 2022
%Y Cf. A000292, A023856, A023857, A024305, A024854.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_
%E Formula, program, and slight revision by _Charles R Greathouse IV_, Feb 23 2010