Let's call a natural number interesting if any of its two digits consecutive forms a number that is a multiple of $19$ or $21$. For example, The number $7638$ is interesting, because $76$ is a multiple of $19$, $63$ is multiple of $21$, and $38$ is a multiple of $19$. How many interesting numbers of $2022$ digits exist?
Problem
Source:
Tags: number theory
sujithm
24.03.2024 03:20
First, let's list the 2-digit multiples of $21$ and $19$.
$21$: $21,42,63,84$
$19$: $19,38,57,76,95$
Notice that, in an interesting number, the ones digit of any given multiple is the tens digit of the following multiple.
Upon further inspection, we can see that $57\rightarrow76\rightarrow63\rightarrow38\rightarrow84\rightarrow42\rightarrow21\rightarrow19\rightarrow95\rightarrow57$
Thus, the pattern is cyclic with period 9.
Erasing the tens digit from each multiple will allow us to see which digit precedes the other and vice versa.
So, $7\rightarrow6\rightarrow3\rightarrow8\rightarrow4\rightarrow2\rightarrow1\rightarrow9\rightarrow5\rightarrow7$
With this in mind, finding the amount of 2022-digit interesting numbers is easy as there is exactly one such number for every possible last digit.
Since there are $9$ possible last digits, the answer is $\fbox{9}$.