cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A339804 a(n) = Sum_{k=1..floor(n/2)} k * (n-k) * floor((n-k)/k).

Original entry on oeis.org

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
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 17 2020

Keywords

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

Crossrefs

Programs

  • Mathematica
    Table[Sum[k (n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 50}]
  • 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

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