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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

0, 0, 2, 6, 13, 24, 37, 56, 78, 106, 132, 178, 212, 258, 312, 376, 425, 508, 565, 662, 749, 836, 909, 1058, 1156, 1264, 1384, 1536, 1636, 1836, 1946, 2126, 2282, 2434, 2606, 2880, 3019, 3194, 3385, 3676, 3833, 4138, 4305, 4572, 4863, 5086, 5271, 5692, 5924, 6240
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 21 2020

Keywords

Comments

Total area of all rectangles with dimensions (y-x) X (z) where x and y are integers such that x + y = n, 0 < x <= y, and z = floor(y/x).

Crossrefs

Programs

  • Mathematica
    Table[Sum[(n - 2 k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 60}]
  • Python
    from math import isqrt
    def A338991(n): return ((s:=isqrt(n))+1)*(n*(1-s)+s**2)-sum((q:=n//k)*((k-n<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 23 2023

Formula

From Vaclav Kotesovec, Jun 24 2021: (Start)
a(n) = n + n*A006218(n) - 2*A024916(n).
a(n) ~ (log(n) + 2*gamma - Pi^2/6 - 1)*n^2, where gamma is the Euler-Mascheroni constant A001620. (End)

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

Original entry on oeis.org

0, 1, 4, 8, 12, 17, 23, 27, 34, 40, 46, 52, 60, 65, 73, 81, 87, 93, 104, 108, 118, 126, 132, 140, 150, 157, 165, 173, 183, 189, 201, 205, 216, 226, 232, 242, 254, 258, 268, 278, 288, 295, 307, 313, 323, 335, 343, 349, 363, 369, 382, 390, 398, 408, 420, 428, 440, 448, 456, 464, 482
Offset: 0

Views

Author

Wesley Ivan Hurt, Dec 22 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[(2 n - i)/i], {i, n}], {n, 0, 60}]
  • PARI
    a(n) = sum(k=1, n, (2*n-k)\k); \\ Michel Marcus, Dec 22 2020

Formula

From Vaclav Kotesovec, Dec 23 2020: (Start)
For n>0, a(n) = 2*A006218(n) + A075989(n) - n.
a(n) ~ 2*n * (log(2*n) + 2*gamma - 2), where gamma is the Euler-Mascheroni constant A001620. (End)

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
Showing 1-3 of 3 results.