OFFSET
2,1
COMMENTS
Sum of the areas of all rectangles with distinct odd side lengths r and s such that r + s = 2n. - Wesley Ivan Hurt, Apr 21 2020
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = n*(4*n^2 - 3*n + 2 + 3*n*(-1)^n)/12. - Luce ETIENNE, Jan 07 2015
G.f.: x^2*(3 + 2*x + 8*x^2 + 2*x^3 + x^4)/((1+x)^3*(1-x)^4). - Robert Israel, Jan 13 2015
a(n) = Sum_{i=1..n-1} i * (2*n-i) * (i mod 2). - Wesley Ivan Hurt, Apr 21 2020
EXAMPLE
For n=2, k=1, and a(n) = s(1)*s(2) = 1*3 = 3.
MAPLE
seq( n*(4*n^2 - 3*n + 2 + 3*n*(-1)^n)/12, n=2..30); # Robert Israel, Jan 13 2015
PROG
(PARI) vector(40, n, sum(k=1, n\2, (2*k-1)*(2*(n-k+1)-1))) \\ Michel Marcus, Jan 07 2015
(PARI) a(n)=n*(2*n^2 - n%2*3*n + 1)/6 \\ Charles R Greathouse IV, Jan 15 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Offset corrected by Michel Marcus, Jan 13 2015
STATUS
approved