%I #35 Dec 11 2023 08:36:40
%S 0,1,2,7,4,22,6,35,26,50,10,126,12,86,100,155,16,247,18,294,172,182,
%T 22,590,124,242,260,518,28,860,30,651,364,386,380,1365,36,470,484,
%U 1390,40,1532,42,1134,1144,662,46,2542,342,1395,772,1526,52,2380,788
%N Total area of all rectangles with dimensions s and t where s | t, n = s + t and s <= t.
%H Vincenzo Librandi, <a href="/A303384/b303384.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>
%F a(n) = Sum_{i=1..floor(n/2)} i * (n-i) * (floor((n-i)/i) - floor((n-i-1)/i)).
%F a(n) = Sum_{d|n} d*(n-d). - _Daniel Suteu_, Jun 19 2018
%F a(n) = n*sigma(n) - sigma_2(n). - _Ridouane Oudra_, Apr 15 2021
%F From _Amiram Eldar_, Dec 11 2023: (Start)
%F a(n) = A064987(n) - A001157(n).
%F Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = zeta(2) - zeta(3) = 0.442877... . (End)
%p with(numtheory): seq(n*sigma(n) - sigma[2](n), n=1..60); # _Ridouane Oudra_, Apr 15 2021
%t Table[Sum[i (n - i) (Floor[(n - i)/i] - Floor[(n - i - 1)/i]), {i, Floor[n/2]}], {n, 80}]
%t a[n_] := n * DivisorSigma[1, n] - DivisorSigma[2, n]; Array[a, 100] (* _Amiram Eldar_, Dec 11 2023 *)
%o (Magma) [0] cat [&+[k*(n-k)*((n-k) div k)-(n-k-1) div k: k in [1..n div 2]]: n in [2..80]]; // _Vincenzo Librandi_, Jun 07 2018
%o (PARI) a(n) = sum(i=1, n\2, i*(n-i)*((n-i)\i - (n-i-1)\i)); \\ _Michel Marcus_, Jun 07 2018
%o (PARI) a(n) = sumdiv(n, d, d*(n-d)); \\ _Daniel Suteu_, Jun 19 2018
%o (PARI) a(n) = {my(f = factor(n)); n * sigma(f) - sigma(f, 2);} \\ _Amiram Eldar_, Dec 11 2023
%o (GAP) List([1..60],n->Sum([1..Int(n/2)],i->i*(n-i)*(Int((n-i)/i)-Int((n-i-1)/i)))); # _Muniru A Asiru_, Jun 07 2018
%Y Cf. A297024, A303385.
%Y Cf. A000203, A001157.
%Y Cf. A002117, A013661.
%K nonn,easy
%O 1,3
%A _Wesley Ivan Hurt_, Apr 22 2018