Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2007-part-02 — 187 problems (EN–VI) Question 95

Math Olympiad Vault · MathNet 2007-part-02 — 187 problems (EN–VI)

Question 95

Let $a$, $b$ be two co-prime positive integers. A number is called good if it can be written in the form $a x + b y$ for non-negative integers $x$, $y$. Define the function $f: \mathbb{Z} \rightarrow \mathbb{Z}$ as $f(n) = n - n_{a} - n_{b}$, where $s_{t}$ represents the remainder of $s$ upon division by $t$. Show that an integer $n$ is good if and only if the infinite sequence $n, f(n), f(f(n)), \ldots$ contains only non-negative integers.