Exercise 3. Consider a number $N$ that is written in the form $30 x 070 y 03$, with $x, y$ being digits between 0 and 9. For which values of $(x, y)$ is the integer $N$ divisible by 37?
Solution to exercise 3 We can write $N=300070003+1000000 x+100 y$. Now $100=37 \times 3-11$ and since $1000=37 \times 30-110=37 \times 27+1,1000000=1000^{2}=37 \times\left(37 \times 27^{2}+2 \times 27\right)+1$ (by double distributivity).

Since 37 divides $N$, 37 also divides $300070003+x-11 y$. By performing the Euclidean division of 300070003 by 37, we find that $300070003=37 \times 8110000+3$.

In short, 37 divides $N$ if and only if it divides $3+x-11 y$, which is an integer between 12 (if $x=9$ and $y=0$) and -96 (if $x=0$ and $y=9$). Therefore, there are only three possibilities:

- we have $3+x-11 y=0$, that is, $y=1$ and $x=8$;
- we have $3+x-11 y=-37$, so $y=4$ and $x=4$;
- we have $3+x-11 y=-74$, so $y=7$ and $x=0$.