login
A023855
a(n) = 1*(n) + 2*(n-1) + 3*(n-2) + ... + (n+1-k)*k, where k = floor((n+1)/2).
18
1, 2, 7, 10, 22, 28, 50, 60, 95, 110, 161, 182, 252, 280, 372, 408, 525, 570, 715, 770, 946, 1012, 1222, 1300, 1547, 1638, 1925, 2030, 2360, 2480, 2856, 2992, 3417, 3570, 4047, 4218, 4750, 4940, 5530, 5740, 6391, 6622, 7337, 7590, 8372, 8648, 9500, 9800, 10725, 11050
OFFSET
1,2
COMMENTS
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
Antidiagonal sums of triangle A075362. - L. Edson Jeffery, Jan 20 2012
FORMULA
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.
G.f.: x*(1+x+2*x^2)/((1-x)^4*(1+x)^3). - Ralf Stephan, Apr 28 2004
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
a(n) = (4*n^3 + 15*n^2 + 14*n + 3 - 3*(n+1)^2*(-1)^n)/48. - Luce ETIENNE, Oct 22 2014
a(n) = (A000292(n) + (n mod 2)*(ceiling(n/2))^2)/2. - Luc Rousseau, Feb 25 2018
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
MAPLE
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
MATHEMATICA
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 2, 7, 10, 22, 28, 50}, 60] (* Vincenzo Librandi, Jan 23 2012 *)
Table[-Ceiling[n/2] (Ceiling[n/2] + 1) (2 Ceiling[n/2] - 3 n - 2)/6, {n, 100}] (* Wesley Ivan Hurt, Sep 20 2013 *)
PROG
(PARI) a(n)=if(n%2, (n+1)*(n+3)*(2*n+1)/24, n*(n+1)*(n+2)/12)
(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
(Haskell)
a023855 n = sum $ zipWith (*) [1 .. div (n+1) 2] [n, n-1 ..]
-- Reinhard Zumkeller, Jan 23 2012
(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
(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
CROSSREFS
KEYWORD
nonn,easy
EXTENSIONS
Formula, program, and slight revision by Charles R Greathouse IV, Feb 23 2010
STATUS
approved