A way to check if a number is divisible by 7 is to subtract, from the number formed by the remaining digits after removing the units digit, twice the units digit, and check if this number is divisible by 7. For example, 336 is divisible by 7, because $33 - 2 \cdot 6 = 21$ is divisible by 7, but 418 is not because $41 - 2 \cdot 8 = 25$ is not.

a) Use this method to check if 4,578 is divisible by 7.

b) If $A$ and $B$ are digits, how many three-digit numbers of the form $\overline{A B 5}$ are divisible by 7?
Solution

a) $457-2 \cdot 8=441 \rightarrow 44-2 \cdot 1=42$, which is divisible by 7, so 4,578 is also divisible by 7.

b) Since $\overline{A B 5}$ has three digits, then $A \neq 0$. Moreover, $\overline{A B}-14$, by the rule of divisibility, is a multiple of 7, and consequently, $\overline{A B}$ must be a multiple of 7, since 14 is, that is, $A B$ can be any element of the set

$$
\{14,21,28,35,42,49,56,63,70,77,84,91,98\}
$$

Therefore, there are 13 numbers.