Maths Olympiad Prep

Library / HMMT February /1040 of 1302

HMMT February, 2018

Number theory Difficulty 5.6 AIME, harder Prove it United States

Problem:
Compute the number of integers n∈{1,2,…,300}n \in \{1,2, \ldots, 300\} such that nn is the product of two distinct primes, and is also the length of the longest leg of some nondegenerate right triangle with integer side lengths.

Solution

Solution:
Let n=p⋅qn = p \cdot q for primes p<qp < q. If nn is the second largest side of a right triangle there exist integers c,ac, a such that a<pqa < p q and (pq)2=c2−a2=(c−a)(c+a)(p q)^2 = c^2 - a^2 = (c-a)(c+a). Since c−a<c+ac-a < c+a there are three cases for the values of c−a,c+ac-a, c+a, and in each case we determine when a<pqa < p q.

a. c−a=1c-a = 1 and c+a=p2q2c+a = p^2 q^2 : Then a=p2q2−12>pqa = \frac{p^2 q^2 - 1}{2} > p q, so there are no solutions.

b. c−a=pc-a = p and c+a=pq2c+a = p q^2 : Then a=pq2−p2>pqa = \frac{p q^2 - p}{2} > p q.

c. c−a=p2c-a = p^2 and c+a=q2c+a = q^2. Then a=q2−p22a = \frac{q^2 - p^2}{2} which we require to be less than pqp q. This is equivalent to
q2−p22<pqq2<2pq+p22q2<(q+p)22q<q+p(2−1)q<p<q \begin{aligned} \frac{q^2 - p^2}{2} & < p q \\ q^2 & < 2 p q + p^2 \\ 2 q^2 & < (q + p)^2 \\ \sqrt{2} q & < q + p \\ (\sqrt{2} - 1) q & < p < q \end{aligned}
So the problem is equivalent to finding the number of distinct prime pairs (p,q)(p, q) such that pq<300p q < 300 and (2−1)q<p<q(\sqrt{2} - 1) q < p < q. There are 13 such pairs:
{(3,5),(3,7),(5,7),(5,11),(7,11),(7,13),(11,13),(11,17),(11,19),(11,23),(13,17),(13,19),(13,23)} \{(3,5), (3,7), (5,7), (5,11), (7,11), (7,13), (11,13), (11,17), (11,19), (11,23), (13,17), (13,19), (13,23)\}
and 13⋅23=29913 \cdot 23 = 299 which is the biggest such pair.
The most interesting borderline case are (3,7):37≈.42>2−1(3,7): \frac{3}{7} \approx .42 > \sqrt{2} - 1, which leads to the (20,21,29)(20,21,29) triangle, (5,13):513≈.385<2−1(5,13): \frac{5}{13} \approx .385 < \sqrt{2} - 1, which leads to the (65,72,97)(65,72,97) triangle, and (7,17):717≈.411<2−1(7,17): \frac{7}{17} \approx .411 < \sqrt{2} - 1 which leads to the (119,120,169)(119,120,169) right triangle.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.