login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339804 a(n) = Sum_{k=1..floor(n/2)} k * (n-k) * floor((n-k)/k). 1
0, 1, 4, 13, 22, 50, 68, 116, 162, 236, 278, 437, 498, 634, 794, 1018, 1118, 1450, 1574, 1975, 2276, 2598, 2774, 3519, 3834, 4273, 4746, 5490, 5772, 6887, 7214, 8163, 8856, 9586, 10330, 12072, 12540, 13443, 14382, 16244, 16806, 18861, 19480, 21192, 22954, 24267 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Total volume of all rectangular prisms with dimensions (x, y, z) where x and y are positive integers such that x + y = n, x <= y, and z = floor(y/x). - Wesley Ivan Hurt, Dec 20 2020
LINKS
FORMULA
a(n) ~ n^3*(Pi^2-2-4*zeta(3))/12. - Rok Cestnik, Dec 19 2020
a(n) = n*A153485(n) - A279847(n). - Vaclav Kotesovec, Dec 21 2020
MATHEMATICA
Table[Sum[k (n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 50}]
PROG
(PARI) a(n) = sum(k=1, n\2, k*(n-k)*((n-k)\k)); \\ Michel Marcus, Dec 19 2020
(Python)
from math import isqrt
def A339804(n): return (n*(1-n**2)+((s:=isqrt(n))**4<<1)+s**3*(3*(1-n))+s**2*(1-3*n) + sum((q:=n//k)*(-6*k**2+n*(3*((k<<1)+q+1))-q*((q<<1)+3)-1) for k in range(1, s+1)))//6 # Chai Wah Wu, Oct 27 2023
CROSSREFS
Sequence in context: A341005 A183148 A202089 * A256390 A264623 A063631
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 17 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 31 04:10 EDT 2024. Contains 374774 sequences. (Running on oeis4.)