Let $\overline{a b}$ be a two-digit integer ${ }^{2}$. A positive integer is a relative of $\overline{a b}$ if:

i) the units digit of $n$ is also $b$.

ii) the other digits of $n$ are distinct from zero and sum to $a$.

For example, the relatives of 31 are 31, 121, 211, and 1111. Find all two-digit numbers that divide all of their relatives.
Solution

Let's divide the problem into cases:

1) If $a=1$ and $n$ is a relative of $\overline{a b}$, then the only possibility is $n=\overline{1 b}$. This number is always a solution, as $\overline{1 b}$ divides $\overline{1 b}$.
2) If $a=2$, since $\overline{2 b}$ must divide $\overline{11 b}$, then $\overline{2 b}$ must divide $\overline{11 b}-\overline{2 b}=90$. The divisors of $90=2 \cdot 3^{2} \cdot 5$ are

$$
1,2,3,5,6,9,10,15,18,30,45 \text { and } 90
$$

Since $20 \leq \overline{2 b}=20+b \leq 29$, there are no solutions in this case.

3) If $a \geq 3$, since $\overline{a b}$ must divide $\overline{(a-3) 21 b}$ and $\overline{(a-3) 12 b}$, then $\overline{a b}$ divides the difference $\overline{(a-3) 21 b}-\overline{(a-3) 12 b}=90$. Recalling the divisor analysis from the previous item, the only possibilities are 30, 45, and 90, given that $\overline{a b} \geq 30$. It remains to verify that these three options divide all their relatives.

i) If $n$ is a relative of 30, then $n$ ends in 0 and the sum of its digits is a multiple of 3. Therefore, $n$ is a multiple of $10 \cdot 3=30$.
ii) If $n$ is a relative of 45, then $n=A \cdot 10+5$, where $A$ is a number whose sum of digits is 4. Since the sum of the digits of $n$ is a multiple of 9, $n$ is also a multiple of 9. Additionally, since $n$ ends in 5, $n$ is also a multiple of 5. Therefore, $n$ is a multiple of $9 \cdot 5=45$.
iii) If $n$ is a relative of 90, then $n=A \cdot 10$, where $A$ is a number whose sum of digits is 9. Since $n$ ends in 0 and is a multiple of 9, it follows that $n$ is a multiple of $9 \cdot 10=90$.

Therefore, the only positive integers that divide all their relatives are

$$
10,11,12,13,14,15,16,17,18,19,30,45 \text { and } 90
$$