Maths Olympiad Prep

Library / Shortlist JBMO /32 of 50

Shortlist JBMO, 2007

Number theory Difficulty 6.1 National Olympiad Prove it JBMO

Problem:
Let aa, bb be two co-prime positive integers. A number is called good if it can be written in the form ax+bya x + b y for non-negative integers xx, yy. Define the function f:Z→Zf: \mathbb{Z} \rightarrow \mathbb{Z} as f(n)=n−na−nbf(n) = n - n_{a} - n_{b}, where sts_{t} represents the remainder of ss upon division by tt. Show that an integer nn is good if and only if the infinite sequence n,f(n),f(f(n)),…n, f(n), f(f(n)), \ldots contains only non-negative integers.

Solution

Solution:
If nn is good then n=ax+byn = a x + b y. Also na=(by)an_{a} = (b y)_{a} and nb=(ax)bn_{b} = (a x)_{b} so
f(n)=ax−(ax)b+by−(by)a=by′+ax′ f(n) = a x - (a x)_{b} + b y - (b y)_{a} = b y' + a x'
is also good, thus the sequence contains only good numbers which are non-negative.

Now we have to prove that if the sequence contains only non-negative integers then nn is good. Because the sequence is non-increasing, the sequence will become constant from some point onwards. But f(k)=kf(k) = k implies that kk is a multiple of aba b, thus some term of the sequence is good. We are done if we prove the following:

Lemma: f(n)f(n) is good implies nn is good.

Proof of Lemma: n=2n−na−nb−f(n)=ax′+by′−ax−by=a(x′−x)+b(y′−y)n = 2 n - n_{a} - n_{b} - f(n) = a x' + b y' - a x - b y = a(x' - x) + b(y' - y) and x′≥xx' \geq x because n≥f(n)⇒n−na≥f(n)−f(n)a⇒ax′≥ax+by−(by)a≥axn \geq f(n) \Rightarrow n - n_{a} \geq f(n) - f(n)_{a} \Rightarrow a x' \geq a x + b y - (b y)_{a} \geq a x. Similarly y′≥yy' \geq y.

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.