4. Petya wrote on the board in descending order $n$ consecutive two-digit numbers, the last of which does not contain the digit 7. Vasya thought that this was the decimal representation of a natural number $x$, and he factored $x$ into prime factors. It turned out that there were only two of them and they differ by 4. What is written on the board?
Answer: 91.

Solution. Let $a$ and $b$ be the prime divisors of $x$, with $b=a+6$. The pairs of the last digits of $a$ and $b$ can be $(1,7),(3,9),(7,3)$. Since $x$ cannot end in 7, only the last case is possible. Then the number $y=\frac{a+b}{2}$ ends in 5 or 0. Note that the number $x$ is odd and $x=y^{2}-9$. Therefore, the number $y$ is even, meaning it is a multiple of 10, from which

$$
x \bmod 100=\left(y^{2}-9\right) \bmod 100=100-9=91 .
$$

Thus, $x$ ends in 91 and can take one of the following values:

$$
91,9291,939291, \ldots, 9998 \ldots 9291
$$

The first one fits, since $91=13 \cdot 7$. We will show that all other numbers do not fit. Indeed, for them $y^{2}$ ends in 300. Then the number $y$ can be represented as $10 z$, where $z^{2}$ ends in 3, which is impossible. Therefore, $x=91$ is the only answer.