Exact Counting of Pythagorean Triangles with Bounded Legs: Sublinear Algorithms and New Terms of OEIS A239581, A239744, A239786

This paper provides an exact sublinear computation of the number of Pythagorean triangles with legs x < y <= N, considering both primitive triangles Q(N) and all triangles T(N). The problem is connected to the sequences A239581, A239744, and A239786 in the OEIS, where terms were previously known only up to N = 10^11. We demonstrate that the plane of Euclid pairs (m,n) is partitioned by the ray m = (1+sqrt(2))n into two symmetric hyperbolic regions under different coordinates: mn <= Y/2 and uv <= Y (with u=m-n, v=m+n). The boundary is evaluated exactly using Beatty floor sums with a 40-digit approximation of sqrt(2), and the coprimality condition is handled via Möbius inversion. The resulting algorithm achieves O(sqrt(N) log N) for Q(N) and O(N^(2/3)) for T(N). We successfully reproduce all 11 known OEIS terms and extend the sequences by computing new terms up to N = 10^17 for primitive triangles (a(17) = 17860363013590019) and N = 10^13 for all triangles.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-21
DOI
https://doi.org/10.5281/zenodo.23518200
Primary Topic
Analytic Number Theory Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Exact Counting of Pythagorean Triangles with Bounded Legs: Sublinear Algorithms and New Terms of OEIS A239581, A239744, A239786

Mark Kim
Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
preprint

Exact Counting of Pythagorean Triangles with Bounded Legs: Sublinear Algorithms and New Terms of OEIS A239581, A239744, A239786

Mark Kim
preprint en

Abstract

This paper provides an exact sublinear computation of the number of Pythagorean triangles with legs x < y <= N, considering both primitive triangles Q(N) and all triangles T(N). The problem is connected to the sequences A239581, A239744, and A239786 in the OEIS, where terms were previously known only up to N = 10^11. We demonstrate that the plane of Euclid pairs (m,n) is partitioned by the ray m = (1+sqrt(2))n into two symmetric hyperbolic regions under different coordinates: mn <= Y/2 and uv <= Y (with u=m-n, v=m+n). The boundary is evaluated exactly using Beatty floor sums with a 40-digit approximation of sqrt(2), and the coprimality condition is handled via Möbius inversion. The resulting algorithm achieves O(sqrt(N) log N) for Q(N) and O(N^(2/3)) for T(N). We successfully reproduce all 11 known OEIS terms and extend the sequences by computing new terms up to N = 10^17 for primitive triangles (a(17) = 17860363013590019) and N = 10^13 for all triangles.

Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Exact Counting of Pythagorean Triangles with Bounded Legs: Sublinear Algorithms and New Terms of OEIS A239581, A239744, A239786 — Mark Kim · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS