7. Vovochka wrote on the board the equality $101=11011$. The computer science teacher said that this equality would be true if it is understood as the same number written in different number systems. Find the bases of these number systems.
# Answer: 18 and 4.

Solution. Let the base of the first number be $n$, and the second $-k$. Then the equality written by Vovochka is equivalent to the equation

$$
n^{2}+1=k^{4}+k^{3}+k+1 \Leftrightarrow n^{2}=k^{4}+k^{3}+k, \quad n, k \in \mathbb{N}
$$

Multiply the last equation by 4 and factor out perfect squares:

$$
(2 n)^{2}=\left(2 k^{2}+k\right)^{2}+4 k-k^{2}
$$

Since for $k>4$ the inequality $4 k-k^{2}<0$ holds, we have $(2 n)^{2}<\left(2 k^{2}+k\right)^{2}$. On the other hand, for $k>4$ the inequality $(2 n)^{2}4 k^{4}+4 k^{3}-3 k^{2}-2 k+1 \Leftrightarrow 4 k^{4}+4 k^{3}+4 k>4 k^{4}+4 k^{3}-3 k^{2}-2 k+1 \Leftrightarrow 3 k^{2}+6 k-1>0$.

The solutions to the last inequality form the set

$$
\left(-\infty ; \frac{-3-2 \sqrt{3}}{3}\right) \cup\left(\frac{-3+2 \sqrt{3}}{3} ;+\infty\right)
$$

therefore, the specified inequality holds for all natural $k$ (since $\frac{-3+2 \sqrt{3}}{3}<1$).

Thus, for $k>4$ the inequalities $\left(2 k^{2}+k-1\right)^{2}<(2 n)^{2}<\left(2 k^{2}+k\right)^{2}$ hold, which is impossible.

It remains to check the values $k=1,2,3,4$. Checking shows that only $k=4$, $n=18$ fit.