Let $a, b$ be coprime positive integers. A positive integer $n$ is said to be weak if there do not exist any nonnegative integers $x, y$ such that $ax+by=n$. Prove that if $n$ is a weak integer and $n < \frac{ab}{6}$, then there exists an integer $k \geq 2$ such that $kn$ is weak.
Problem
Source: Spain Mathematical Olympiad 2018 P5
Tags: number theory, Spain, Diophantine equation
mathman3880
18.03.2018 00:27
Claim: Either $2n$ is weak or $3n$ is weak.
Call a positive integer $n$ strong if it is not weak.
Lemma: If $n$ is weak, then $ab - n$ is strong.
Proof: Suppose the Diophantine $ax + by = n$ has the family of solutions $(x, y) = (x_0 + bt, y_0 - at)$ where $x_0, y_0$ is the initial solution with $-b < x_0 \leq b$ and $-a \leq y_0 < a$.
Without loss of generality, suppose that $x_0 \geq 0$; then it follows that $y_0 < 0$ as $n$ is weak.
Since it is given $n < \frac{ab}{6} < ab$ (and in general, $n \leq ab - a - b$), it follows in fact that $0 < x_0 < b$.
Then clearly, $ab - n = ab - ax_0 - by_0 = a(b - x_0) + b(-y_0)$ where $ b - x_0$ and $-y_0$ are clearly positive; hence $ab - n$ is strong.
Now, to the main problem.
The previous lemma implies that any weak $n$ may be written in the form $ab - pa - qb$ for positive integers $p$ and $q$.
Let $n = ab - pa - qb$; it now suffices to show that for some $k \geq 2$, $ab - k(ab - pa - qb)$ is strong.
From $n < \frac{ab}{6}$, we may rearrange and conclude that $\frac{p}{b} + \frac{q}{a} > \frac{5}{6}$.
Without loss of generality, suppose $\frac{p}{b} \geq \frac{q}{a}$.
Then $\frac{p}{b} \geq \frac{5}{12} > \frac{1}{3}$.
Suppose that $\frac{p}{b} \leq \frac{1}{2}$; then $\frac{q}{a} > \frac{1}{3}$.
Then taking $k = 3$ yields $ab - 3(ab - pa - qb) = a(3p - b) + b(3q - a)$ and clearly $3q - a > 0$ and $3p - b > 0$.
Now suppose $\frac{p}{b} > \frac{1}{2}$.
Taking $k = 2$ yields $ab - 2(ab - pa - qb) = a(2p - b) + 2qb$ and $2p - b$ is trivially positive.
Hence it is always possible to pick $k = 2$ or $k = 3$ such that $kn$ is weak.