Juarez used the digits 1, 2, 3, 4, and 5 to write the five-digit number $\overline{a b c d e}$. Without revealing what this number is, he told Luciana that:

$\cdot$ the number $\overline{a b c}$ is divisible by 4;

- the number $\overline{b c d}$ is divisible by 5;

$\cdot$ the number $\overline{c d e}$ is divisible by 3.

Then, Luciana told Juarez that it is possible to figure out what the number $\overline{a b c d e}$ is. Show that Luciana is correct, that is, find the number $\overline{a b c d e}$.
Solution

Every number divisible by 5 has the unit digit equal to 5 or equal to 0. Since the digit 0 was not used by Juarez, for $\overline{b c d}$ to be divisible by 5, we must necessarily have $d=5$.

Every number divisible by 3 is such that the sum of its digits is also divisible by 3. Thus, since $\overline{c d e}$ is divisible by 3, we have that $c+d+e$ is also divisible by 3. On the other hand, since $d=5$, then $c$ and $d$ are less than 5. Therefore, $c+d+e$ is less than 15. Also, since $c$ and $d$ are greater than or equal to 1, $c+d+e$ is also greater than 6. The only multiples of three that are greater than or equal to 6 and less than 15 are 9 and 12. Therefore, $c+d+e$ can only take the values 9, 12. Using the fact again that $d=5$, we have that $c+e$ can only take the values 4 or 7.

Every number divisible by 4 that contains three or more digits is such that the number formed by its tens and units digits (in that order) is also divisible by 4. Thus, since $\overline{a b c}$ is divisible by 4, we have that the number $\overline{b c}$ is also divisible by 4. In particular, $c$ must be even, since every number divisible by four is also even.

Since $c$ is even, then $c=2$ or $c=4$. We will now show that this implies that it cannot be the case that $c+e$ is equal to 4. Indeed, if $c=2$, then for $c+e$ to be equal to 4, we should have $e=2$, which would be impossible since $e \neq c$. If $c=4$, then for $c+e$ to be equal to 4, we should have $e=0$, which would also be impossible, since the digit 0 was not used by Juarez. Thus, we must have that $c+d=7$.

So far we have discovered that:

(1) $c$ is even;

(2) $c+e=7$

(3) $\overline{b c}$ is divisible by 4.

Since $d=5$, then $e \neq 5$. Therefore, from item (2) above, we have that $c \neq 2$. Therefore, the only even value possible for $c$ is 4. We conclude that $c=4$ and $e=3$.

The possible values left for $b$ are 1 and 2. But, from item (3), we conclude that $b=2$ because if $b=1$, then $\overline{b c}$ would be equal to 14, which is not a multiple of 4. Finally, we have that $a=1$. Therefore, the number written by Juarez is $\overline{a b c d e}=12453$.