|
|
A339370
|
|
a(n) = Sum_{k=1..floor(n/2)} (n-k) * floor((n-k)/k).
|
|
4
|
|
|
0, 1, 4, 11, 19, 36, 50, 76, 102, 138, 165, 227, 262, 318, 381, 460, 510, 614, 672, 791, 889, 990, 1064, 1249, 1353, 1477, 1610, 1790, 1891, 2133, 2244, 2455, 2626, 2798, 2983, 3312, 3452, 3649, 3857, 4198, 4356, 4715, 4883, 5190, 5514, 5763, 5949, 6446, 6686, 7045
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Total area of all y X z rectangles such that x + y = n, with x and y integers, 0 < x <= y and z = floor(y/x). - Wesley Ivan Hurt, Dec 21 2020
|
|
LINKS
|
|
|
FORMULA
|
a(n) ~ n^2*(log(n) + 2*EulerGamma - Pi^2/12 - 3/2). - Rok Cestnik, Dec 20 2020
|
|
MATHEMATICA
|
Table[Sum[(n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 60}]
|
|
PROG
|
(PARI) a(n) = sum(k=1, n\2, (n-k) * ((n-k)\k)); \\ Michel Marcus, Dec 02 2020
(Python)
from math import isqrt
def A339370(n): return n*(1-n)+(s:=isqrt(n))**2*(s+1-(n<<1))-sum((q:=n//k)*((k-(n<<1)<<1)+q+1) for k in range(1, s+1))>>1 # Chai Wah Wu, Oct 27 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|