Find all pairs $(x, y)$ of integers such that $1+2^{x}+2^{2 x+1}=y^{2}$.

#
Author: Kanel-Belov A.Ya.

It is clear that $x \geq 0$. If $(x, y)$ is a solution, then $(x, -y)$ is also a solution. If $x=0$, then $y= \pm 2$.

Therefore, in the following, we assume that $x>0, y>0$. Rewrite the equation as $2^{x}\left(1+2^{x+1}\right)=(y-1)(y+1)$.

Then the numbers $y \pm 1$ are even, with one divisible by 4 and the other not. Therefore, $x \geq 3$, and one of the factors is divisible by $2^{x-1}$ and not by $2^{x}$.

Hence, $y=2^{x-1} n+\varepsilon$, where $n$ is odd, $\varepsilon= \pm 1$. In this case, one of the numbers $y-1, y+1$ equals $2^{x-1} n$, and the other equals $-2^{x-1} n + 2 \varepsilon$. Substituting, we get

$2^{x}\left(1+2^{x+1}\right)=2^{2 x-2} n^{2}+2^{x} n \varepsilon$, which simplifies to $1-n \varepsilon=2^{x-2}\left(n^{2}-8\right)$.

If $\varepsilon=1$, this equality is impossible.

For $\varepsilon=-1, n+1=2^{x-2}\left(n^{2}-8\right) \geq 2\left(n^{2}-8\right)$. Therefore, $n \leq 3$. Hence, $n=3, x=4, y=23$.

## Answer

$(0, \pm 2),(4, \pm 23)$.