1. A natural number is called alternant if it has 2014 digits and any two adjacent digits have different parities. What is the smallest alternant number that is divisible by 9? What is the largest?
## Solution:

The smallest alternating number must start with 1. It is followed by the smallest possible even digit, 0, the smallest odd digit, 1, the smallest even digit, 0, and so on, with the 2012th digit being 0. However, if we choose the penultimate digit to be 1, the sum of the chosen digits so far is 1007. We cannot choose any even digit such that the sum of the digits of the formed number (and thus the formed number) is divisible by 9. Therefore, we will choose the penultimate digit to be 3. We can then choose the last digit to be 8, and the formed number, 1010...1038, will be alternating and divisible by 9. It is the smallest number with these properties.

The largest alternating number that is a multiple of 9 will start with $\underbrace{9898 \ldots 98}_{2012 \text{ digits}}$. The sum of the chosen digits so far is $(9+8) \cdot 1006 = M 9 + 2$. We cannot choose the penultimate digit to be 9 (we will not find any even digit for which the formed number is divisible by 9), but by choosing it to be 7, we can take the last digit to be 0, and obtain that the largest alternating number divisible by 9 is 989898...9870.

## Grading:

The smallest alternating number divisible by 9

- has the first 2012 digits equal to $1010 \ldots 10$

![](https://cdn.mathpix.com/cropped/2024_06_07_41190f5fd3784decad28g-3.jpg?height=54&width=1465&top_left_y=1561&top_left_x=301)

$\cdot$ is 1010... 1038 ........................................................................... 2p

The largest alternating number divisible by 9

![](https://cdn.mathpix.com/cropped/2024_06_07_41190f5fd3784decad28g-3.jpg?height=49&width=1457&top_left_y=1709&top_left_x=308)

$\cdot$ has the penultimate digit equal to 7 ........................................................................................................................

$\cdot$ is 9898... 9870 ........................................................................1p

Notes: (partial scores)

- for stating/using the divisibility rule for $9 \ldots . . . . . . . . . . .1 p$
- for guessing (without any justification) one of the numbers ..................... 2p
- for guessing (without any justification) both numbers ..................................