13. The burglar Fabio is dealing with a safe protected by a 5-digit combination, each digit ranging from 1 to 9. Fortunately for him, the careless homeowners have left a note with some clues: "Let $a, b, c, d$ and $e$, in order, be the five digits of the combination. Then both $ae$ and $abe$ and $abde$, read as numbers in base 10, are divisible by 11, but $abcde$ is not." How many attempts at most will Fabio have to make to be sure of opening the safe?
13. The answer is 64. Recall that an integer is divisible by 11 if and only if the sum of the digits in even positions, minus the sum of the digits in odd positions, is a multiple of 11.

From the fact that 11 divides ae, we get $a=e$.

From the fact that 11 divides abe, we get that 11 divides $2a - b$: this condition, for a fixed $a \neq 5$, has a unique solution, while it has no solution if $a=5$. Based on this information, Fabio knows that there are (at most) 8 possibilities for $a$. Furthermore, once $a$ is fixed, the values of $b$ and $e$ are also determined.

From the fact that 11 divides $abde$, we get that $b=d$, so $d$ is also fixed once $a$ is chosen.

Finally, from the fact that 11 does not divide abcde, we get that 11 does not divide $2a + c - 2b$, or equivalently, 11 does not divide $c - b$: this condition, for a fixed $a$ (and thus $b$), is satisfied if and only if $c \neq b$. In particular, for each choice of $a$ in $\{1,2,3,4,6,7,8,9\}$, the number of possible $c$ is always 8.

Fabio therefore knows that he will have to try at most 64 combinations.