Maths Olympiad Prep

Library / /638 of 740

, 2022

Number theory Difficulty 5.5 AIME, harder Prove it United States

Problem:
Compute the number of ordered pairs of positive integers (a,b)(a, b) satisfying the equation
gcd(a,b)a+b2=10000. \operatorname{gcd}(a, b) \cdot a + b^2 = 10000.

Solution

Solution:
Let gcd(a,b)=d\operatorname{gcd}(a, b) = d, a=daa = d a', b=dbb = d b'. Then,
d2(a+b2)=1002. d^2\left(a' + b'^2\right) = 100^2.
Consider each divisor dd of 100100. Then, we need to find the number of solutions in coprime integers to a+b2=1002d2a' + b'^2 = \frac{100^2}{d^2}. Note that every b<100/db' < 100 / d coprime to 1002d2\frac{100^2}{d^2} satisfies this equation, which is equivalent to being coprime to 100d\frac{100}{d}, so then there are φ(100d)\varphi\left(\frac{100}{d}\right) choices for each dd, except for d=100d = 100, which would count the solution (0,100)(0, 100). Then we just need dnφ(100d)1=1001=99\sum_{d \mid n} \varphi\left(\frac{100}{d}\right) - 1 = 100 - 1 = 99.

Solution 2:
Note that bb must be at most 9999 in order for aa to be positive. Now we claim that each choice of b{1,2,,99}b \in \{1, 2, \ldots, 99\} corresponds to exactly one value of aa that satisfies the equation.
To see why this is true, we rewrite the formula as
gcd(a,b)a=(100b)(100+b). \operatorname{gcd}(a, b) \cdot a = (100 - b)(100 + b).
For any prime pp, let vp(n)v_p(n) be the largest integer kk such that pknp^k \mid n. We wish to show that once we fix bb, the value vp(a)v_p(a) is uniquely determined for all pp (which will give us a unique solution for aa). Applying vpv_p to both sides of the equation gives us
min(vp(b),vp(a))+vp(a)=vp(100b)+vp(100+b) \min \left(v_p(b), v_p(a)\right) + v_p(a) = v_p(100 - b) + v_p(100 + b)
We immediately see that there is at most one solution for vp(a)v_p(a) since the left-hand side increases with vp(a)v_p(a). Further, as we increment vp(a)v_p(a), the left-hand side takes on all even numbers up to 2vp(b)2 v_p(b), and then all integers larger than 2vp(b)2 v_p(b). So to show that a solution exists, we need to prove that the right-hand side is always either even or at least 2vp(b)2 v_p(b).
If vp(b)vp(100)v_p(b) \neq v_p(100), then vp(100b)=vp(100+b)=min(vp(100),vp(b))v_p(100 - b) = v_p(100 + b) = \min \left(v_p(100), v_p(b)\right). In this case, vp(100b)+vp(100+b)v_p(100 - b) + v_p(100 + b) is clearly even. Otherwise, assume vp(b)=vp(100)v_p(b) = v_p(100). Then vp(100b)vp(b)v_p(100 - b) \geq v_p(b) and vp(100+b)vp(b)v_p(100 + b) \geq v_p(b), so vp(100b)+vp(100+b)2vp(b)v_p(100 - b) + v_p(100 + b) \geq 2 v_p(b) as desired. Thus, there is always a unique solution for vp(a)v_p(a). Once we fix 1b991 \leq b \leq 99, the value of aa is uniquely determined, so the answer is 9999.

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

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