OFFSET
1,2
COMMENTS
Consider the partitions of n into two parts (p,q). Then 2*a(n) represents the total surface area of the family of rectangular prisms with dimensions p, q and (p + q).
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = Sum_{i=1..floor(n/2)} n*i + n*(n-i) + i*(n-i).
a(n) = floor(n/2)*(6*n^2+3*n-1+3*(n-1)*floor(n/2)-2*floor(n/2)^2)/6.
From Colin Barker, Apr 13 2018: (Start)
G.f.: x^2*(5 + 6*x + 13*x^2 + 3*x^3 + x^4) / ((1 - x)^4*(1 + x)^3).
a(n) = (14*n^3 + 3*n^2 - 2*n) / 24 for n even.
a(n) = (14*n^3 - 12*n^2 - 2*n) / 24 for n odd.
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n>7. (End)
MATHEMATICA
Table[Floor[n/2] (6 n^2 + 3 n - 1 + 3 (n - 1) Floor[n/2] - 2 Floor[n/2]^2)/6, {n, 50}]
PROG
(Magma) [Floor(n/2)*(6*n^2+3*n-1+3*(n-1)*Floor(n/2)-2*Floor(n/2)^2)/6 : n in [1..45]]; // Vincenzo Librandi, Apr 13 2018
(PARI) a(n) = floor(n/2)*(6*n^2+3*n-1+3*(n-1)*floor(n/2)-2*floor(n/2)^2)/6 \\ Felix Fröhlich, Apr 13 2018
(PARI) concat(0, Vec(x^2*(5 + 6*x + 13*x^2 + 3*x^3 + x^4) / ((1 - x)^4*(1 + x)^3) + O(x^60))) \\ Colin Barker, Apr 13 2018
(GAP) List([1..50], n -> n*((4*n+1)*(7*n-4)+15*n*(-1)^n)/48); # Bruno Berselli, Apr 16 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 12 2018
STATUS
approved