Maths Olympiad Prep

Library / HMMT February /1140 of 1302

HMMT February, 2015

Number theory Difficulty 5.8 AIME, harder Prove it United States

Problem:
Let m,nm, n be positive integers with m≥nm \geq n. Let SS be the set of pairs (a,b)(a, b) of relatively prime positive integers such that a,b≤ma, b \leq m and a+b>ma+b>m.
For each pair (a,b)∈S(a, b) \in S, consider the nonnegative integer solution (u,v)(u, v) to the equation au−bv=na u-b v=n chosen with v≥0v \geq 0 minimal, and let I(a,b)I(a, b) denote the (open) interval (v/a,u/b)(v / a, u / b).
Prove that I(a,b)⊆(0,1)I(a, b) \subseteq(0,1) for every (a,b)∈S(a, b) \in S, and that any fixed irrational number α∈(0,1)\alpha \in(0,1) lies in I(a,b)I(a, b) for exactly nn distinct pairs (a,b)∈S(a, b) \in S.

Solution

Solution:
The fact that I(a,b)⊆(0,1)I(a, b) \subseteq (0,1) follows from the small-ness of n≤m<a+bn \leq m < a+b: the smallest solution (u,v)(u, v) has 0≤v≤a−10 \leq v \leq a-1, so u=n+bva<(a+b)+b(a−1)a=b+1u = \frac{n + b v}{a} < \frac{(a+b) + b(a-1)}{a} = b+1 forces 1≤u≤b1 \leq u \leq b.

For the main part of the problem, it suffices (actually, is equivalent) to show that
(i) 0,10,1 each appear exactly nn times as endpoints of intervals I(a,b)I(a, b); and
(ii) each reduced rational p/q∈(0,1)p/q \in (0,1) appears an equal (possibly zero, if qq is large) number of times as left and right endpoints of intervals I(a,b)I(a, b).

We prove these separately as follows:
(i) 00 is a (left) endpoint precisely when v/a=0v/a = 0, or equivalently (a,b)∈S(a, b) \in S has a∣na \mid n (look at vv mod aa). Since n≤mn \leq m, we get ϕ(d)\phi(d) good pairs (d,b)∈S(d, b) \in S for fixed d∣nd \mid n. Indeed, for any coprime residue class modulo dd, there's exactly one representative bb with b≤m<b+db \leq m < b + d. (Conceptually, it may be enlightening to think of SS as part of the Euclidean algorithm tree generated by (1,1)(1,1).)
Thus 00 occurs as an endpoint ∑d∣nϕ(d)=n\sum_{d \mid n} \phi(d) = n times. Similarly, 11 is an endpoint precisely when u=bu = b, or equivalently (a,b)∈S(a, b) \in S has b∣nb \mid n (look at u mod bu \bmod b). By the same reasoning as before, we get nn right endpoint occurrences of 11.

(ii) Fix p/q∈(0,1)p/q \in (0,1) with p,qp, q coprime, so q≥2q \geq 2. We want to show that v1/a1=p/qv_1 / a_1 = p/q occurs for the same number of (a1,b1)∈S(a_1, b_1) \in S as u2/b2=p/qu_2 / b_2 = p/q occurs for (a2,b2)∈S(a_2, b_2) \in S. (In fact, we will show that the number of occurrences of the former in (x,b1)∈S(x, b_1) \in S equals the number of the latter in (a2,x)∈S(a_2, x) \in S.) The former occurs precisely when 1≤a1≤m1 \leq a_1 \leq m, q∣a1q \mid a_1, and (given the first two conditions) v1≡p(a1/q)(moda1)v_1 \equiv p(a_1/q) \pmod{a_1}. Given the first two conditions, the third is equivalent to −nb1−1≡p(a1/q)(moda1)-n b_1^{-1} \equiv p(a_1/q) \pmod{a_1}, or b1(a1/q)≡−np−1(moda1)b_1(a_1/q) \equiv -n p^{-1} \pmod{a_1}. This is equivalent to having (a1/q)∣n(a_1/q) \mid n and b1≡(−n/(a1/q))p−1(modq)b_1 \equiv (-n/(a_1/q)) p^{-1} \pmod{q}.

Similarly, the latter occurs precisely when 1≤b2≤m1 \leq b_2 \leq m, q∣b2q \mid b_2, (b2/q)∣n(b_2/q) \mid n, and a2≡(n/(b2/q))p−1(modq)a_2 \equiv (n/(b_2/q)) p^{-1} \pmod{q}.

As hinted at before, if we consider the occurrences for a fixed value x=a1=b2x = a_1 = b_2, then the number of permitted residue classes b1(moda1)=xb_1 \pmod{a_1} = x (in the former) is the same as the number of permitted residue classes a2(modb2)=xa_2 \pmod{b_2} = x (in the latter): y(modx)y \pmod{x} is permitted in the former if and only if −y(modx)-y \pmod{x} is permitted in the latter; note that (y,x)=1(y, x) = 1 if and only if (−y,x)=1(-y, x) = 1.

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.