Exact Evaluation of OEIS A308166 (Integer Triangles Whose Smallest Side Divides the Largest) in Sublinear Time via the Divisor Summatory Function
Let a(n) be the number of integer-sided triangles with perimeter n whose smallest side divides the largest side (OEIS A308166). The only formula listed in the OEIS is a double sum requiring O(n^2) operations. We prove the exact identity a(n) = [3|n] + m - floor(m/2) + floor(m/3) + 2*D(floor(m/2)) - D(m), where m = n - 1 and D(x) is the divisor summatory function (OEIS A006218). This reduces the evaluation of a(n) to two values of D(x), achieving O(sqrt(n)) complexity via the Dirichlet hyperbola method and O(n^(1/3)) via a Stern-Brocot hull-walk kernel. We derive the asymptotic behavior a(n) = (5/6 - ln 2)*n + O(sqrt(n)). Python 3.12 implementations agree with benchmarks up to n = 10^18. The exact values of a(10^k) for k <= 18 are provided.
Authors
- Mark Kim (ORCID: https://orcid.org/0000-0001-7601-831X)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-24
- DOI
- https://doi.org/10.5281/zenodo.23610817
- Primary Topic
- Analytic Number Theory Research
- Type
- preprint