Maths Olympiad Prep

Library / /171 of 196

Number theory Difficulty 6.2 National Olympiad Prove it Soviet Union

Problem:

Given two relatively prime natural numbers rr and ss, call an integer good if it can be represented as mr+nsmr + ns with m,nm, n non-negative integers and bad otherwise. Prove that we can find an integer cc, such that just one of kk, ckc - k is good for any kk. How many bad numbers are there?

Solution

Solution:

Notice that 00 is good and all negative numbers are bad. Take c=rsrsc = rs - r - s. First, cc is bad. For suppose otherwise: c=mr+nsc = mr + ns. Then mr+ns=(s1)rsmr + ns = (s - 1)r - s. Hence (s1m)r=(n+1)s(s - 1 - m)r = (n + 1)s, so rr divides n+1n + 1. Say n+1=krn + 1 = kr, and then s1m=kss - 1 - m = ks, so m=(1k)s1m = (1 - k)s - 1. But n+1n + 1 is positive, so k1k \geq 1, and hence mm is negative. Contradiction.

If kk is good, then ckc - k must be bad (otherwise cc would be good). Suppose kk is bad. Since rr and ss are relatively prime we can find integers aa and bb with ar+bs=1ar + bs = 1 and hence integers mm and nn with mr+ns=kmr + ns = k. Adding a multiple of srrssr - rs to both sides if necessary, this gives a pair m,nm, n with mr+ns=kmr + ns = k and mm non-negative. Now take the pair with the smallest possible nonnegative mm. Then ms1m \leq s - 1 (for otherwise m=msm' = m - s, n=n+rn' = n + r would be a pair with smaller non-negative mm). Also n1n \leq -1, otherwise kk would be good. Now ck=(s1m)r+(n1)sc - k = (s - 1 - m)r + (-n - 1)s and the coefficients s1ms - 1 - m and n1-n - 1 are both non-negative, so ckc - k is good.

So exactly (rsrs+1)/2(rs - r - s + 1)/2 integers are bad.

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.