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.

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

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Dec 01 2020

Keywords

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

Crossrefs

Programs

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

Formula

a(n) ~ n^2*(log(n) + 2*EulerGamma - Pi^2/12 - 3/2). - Rok Cestnik, Dec 20 2020
a(n) = n*A002541(n) - A153485(n). - Vaclav Kotesovec, Dec 21 2020