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-2 of 2 results.

A339918 a(n) = Sum_{k=1..n} floor(3*n/k).

Original entry on oeis.org

0, 3, 9, 16, 25, 33, 43, 53, 64, 73, 86, 96, 110, 118, 133, 145, 158, 169, 182, 196, 211, 221, 237, 247, 266, 276, 291, 306, 321, 331, 350, 362, 379, 391, 407, 423, 438, 450, 467, 481, 502, 511, 530, 542, 561, 575, 590, 606, 626, 638, 655, 669, 690, 698, 721
Offset: 0

Views

Author

Vaclav Kotesovec, Dec 23 2020

Keywords

Comments

In general, for m>=1, Sum_{k=1..n} floor(m*n/k) ~ m*n * (log(m*n) + 2*gamma - H(m)), where H(m) = A001008(m)/A002805(m) is the m-th harmonic number and gamma is the Euler-Mascheroni constant A001620.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[3*n/k], {k, 1, n}], {n, 0, 100}]
  • PARI
    a(n) = sum(k=1, n, floor(3*n/k)); \\ Michel Marcus, Dec 23 2020

Formula

a(n) ~ 3*n * (log(3*n) + 2*gamma - 11/6), where gamma is the Euler-Mascheroni constant A001620.

A385807 Number of integer lattice points (x, y) strictly inside a triangle of base 2n - 1 and height n - 1, such that 1 <= x <= 2n - 1, 1 <= y < min(x, 2n - x), and y | x.

Original entry on oeis.org

0, 1, 3, 6, 10, 13, 18, 23, 27, 32, 39, 42, 50, 55, 60, 67, 74, 79, 87, 92, 99, 106, 115, 118, 128, 135, 140, 149, 158, 161, 172, 179, 187, 194, 201, 208, 219, 226, 233, 240, 252, 255, 268, 273, 280, 293, 300, 305, 316, 325, 333, 340, 353, 356, 367, 376, 385, 394, 403, 408, 424, 429
Offset: 1

Views

Author

Rickey W. Austin, Jul 09 2025

Keywords

Comments

The count excludes points on the base and edges.

Examples

			For n = 4, the triangle has x in [1,7]. Valid (x, y) points satisfying y < min(x, 8 - x) and y divides x are: (2,1), (3,1), (4,1), (4,2), (5,1). So a(4) = 5.
		

Crossrefs

Cf. A000005 (number of divisors), A032741 (divisors < n), A339217 (for optimized generation of lattice divisor patterns).

Programs

  • PARI
    a(n) = sum(x=1, 2*n-1, sumdiv(x, y, y < min(x, 2*n-x))); \\ Michel Marcus, Jul 11 2025
  • Python
    def a(n): return sum(1 for y in range(1, n) for k in range(1, (2*n)//y + 1) if y < min(y*k, 2*n - y*k))
    print([a(n) for n in range(1, 63)])
    

Formula

a(n) = |{ (x, y) : 1 <= x <= 2n - 1, 1 <= y < min(x, 2n - x), and y divides x }|.
Showing 1-2 of 2 results.