This paper considers the exact computation of the number of primitive Q(N) and all T(N) integer-sided triangles with a 120-degree angle and perimeter at most N. Standard methods scale linearly with O(N) complexity. We show that primitive triangles correspond one-to-one to pairs (x,y) satisfying 3x < 2y < 4x, gcd(x,y)=1, and 3 does not divide y, where the perimeter equals the product xy. The problem is thus reduced to evaluating a wedge-shaped hyperbolic sum under xy <= Z. By splitting the summation at a threshold of Z^(1/3) and removing the coprimality condition via Möbius inversion over integers coprime to 3, we obtain an O(sqrt(N) log N) algorithm for Q(N) and an O(N^(2/3)) algorithm for T(N). We derive the exact asymptotic density for primitive partitions as 9*ln(4/3)/(4*pi^2) * N. Python 3.12 implementations demonstrate substantial speedups against linear baselines, enabling the calculation of exact counts up to N = 10^16 for Q(N) and N = 10^13 for T(N).
No takes yet. Share an insight, caveat, or question.
Mark Kim (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: