Maths Olympiad Prep

Library / /2 of 3

, 2020

Number theory Difficulty 8.0 National olympiad, round 2 Prove it Netherlands

Let aa, b2b \ge 2 be positive integers with gcd(a,b)=1\gcd(a, b) = 1. Let rr be the smallest positive value that abcd\frac{a}{b} - \frac{c}{d} can take, where cc and dd are positive integers satisfying cac \le a and dbd \le b. Prove that 1r\frac{1}{r} is an integer.

Solution

We will first show that it is possible to choose cc and dd such that abcd=1bd\frac{a}{b} - \frac{c}{d} = \frac{1}{bd}.

Because gcd(a,b)=1\gcd(a, b) = 1, there exists a multiplicative inverse b1b^{-1} of bb modulo aa. Now let cc with 1ca1 \le c \le a be such that cb1(moda)c \equiv -b^{-1} \pmod a. Then we have bc1(moda)bc \equiv -1 \pmod a, hence abc+1a \mid bc + 1. Define d=bc+1ad = \frac{bc+1}{a}, which is a positive integer. We have d=bc+1aba+1a=b+1ad = \frac{bc+1}{a} \le \frac{ba+1}{a} = b + \frac{1}{a}. Because a2a \ge 2 and dd is an integer, we get dbd \le b. All conditions are met. Hence, we have abcd=adbcbd=bc+1bcbd=1bd\frac{a}{b} - \frac{c}{d} = \frac{ad-bc}{bd} = \frac{bc+1-bc}{bd} = \frac{1}{bd}.

If this is the smallest possible outcome, then we are done, because 1r=bd\frac{1}{r} = bd would be an integer. We will show that no smaller positive outcome is achievable. Let cc and dd be as above, and suppose there are positive integers cac' \le a and dbd' \le b such that 0<abcd<1bd0 < \frac{a}{b} - \frac{c'}{d'} < \frac{1}{bd}. We will derive a contradiction.

Let x=adbcx = ad' - bc', then we have abcd=xbd\frac{a}{b} - \frac{c'}{d'} = \frac{x}{bd'}, hence xbd<bdxbd < bd', which yields xd<dxd < d'. We also know that x>0x > 0. Hence, 0<xd<db0 < xd < d' \le b, which means that xdxd and dd' are two distinct numbers whose difference is less than bb. Moreover, from x=adbcx = ad' - bc' we get that xad(modb)x \equiv ad' \pmod b. On the other hand, we know that adbc=1ad - bc = 1, hence ad1(modb)ad \equiv 1 \pmod b, hence xadx(modb)xad \equiv x \pmod b. Combining this, we get adxad(modb)ad' \equiv xad \pmod b. Because gcd(a,b)=1\gcd(a, b) = 1 we may divide by aa, hence dxd(modb)d' \equiv xd \pmod b. However, we already saw that dd' and xdxd are distinct numbers whose difference is smaller than bb, hence this is impossible.

We conclude that the cc and dd we found indeed give the smallest possible outcome, and hence 1r\frac{1}{r} is an integer. \square

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 and solution reproduced as published; topic and difficulty added by this site.