Let's determine all integer pairs \((x, y)\) for which the following equation holds:

$$
1+2^{x}+2^{2 x+1}=y^{2}
$$
Solution. If $x>2$, then the left side of (1) is odd, so if $y$ is an integer, then $y=2k+1$ for some integer $k$. Then (1) is of the form $1+2^{x}+2^{2x+1}=(2k+1)^{2}$, from which, after rearrangement,

$$
2^{x-2}\left(1+2^{x+1}\right)=k(k+1)
$$

One of the factors on the right side is odd, the other is even, so the one that is even is divisible by $2^{x-2}$. It can also be assumed that $k$ is non-negative, since for negative and non-negative values of $k$, $k(k+1)$ takes the same values. The left side of (2) is positive, so $k$ is also positive.

Case 1: $k$ is even. Then $2^{x-2} \mid k$, that is, there is a positive integer $b$ such that $k=b \cdot 2^{x-2}$. Substituting this into (2),

$$
\begin{aligned}
2^{x-2}\left(1+2^{x+1}\right) & =b \cdot 2^{x-2}\left(b \cdot 2^{x-2}+1\right), \quad \text { that is } \\
1+2^{x+1} & =b^{2} \cdot 2^{x-2}+b
\end{aligned}
$$

It can be seen from this that $b \mid 1+2^{x+1}$, so $b$ is odd. If $b=1$, then $1+2^{x+1}>2^{x-2}+1$, the right side of (3) is smaller than the left. If $b>1$, then $b \geq 3$, and thus

$$
b^{2} \cdot 2^{x-2}+b \geq 9 \cdot 2^{x-2}+3>8 \cdot 2^{x-2}+1=2^{x+1}+1
$$

The right side of (3) is larger than the left. Therefore, we do not get any new solutions in Case 1.

Case 2: $k+1$ is even. Then $2^{x-2} \mid k+1$, that is, there is a positive integer $c$ such that $k=c \cdot 2^{x-2}-1$. Substituting this into (2),

$$
\begin{aligned}
2^{x-2}\left(1+2^{x+1}\right) & =\left(c \cdot 2^{x-2}-1\right) c \cdot 2^{x-2}, \quad \text { that is } \\
1+2^{x+1} & =c^{2} \cdot 2^{x-2}-c
\end{aligned}
$$

It is also true that $c \geq 1$ and is odd, so we can perform a similar examination as before.

If $c=1$, then the right side of (4) is $2^{x-2}-1$, smaller than the left side, so we do not get a solution in this case.

If $c=3$, then the equality (4) is: $1+2^{x+1}=9 \cdot 2^{x-2}-3$. After rearrangement, we get $4=2^{x-2}$, that is, $x=4$. Then the left side of (1) is $1+2^{4}+2^{9}=23^{2}$, giving us two solutions: $y=-23, y=23$.

If $c \geq 5$, then transforming the right side of (4),

$$
c^{2} \cdot 2^{x-2}-c=2^{x+1}+\left(c^{2}-8\right) 2^{x-2}-c>2^{x+1}+c^{2}-8-c
$$

If $c \geq 5$, then $c^{2}-8-c>1$, so the right side of (4) is larger than the left side, thus we do not get more solutions. Therefore, the conditions of the problem are satisfied by four pairs of numbers. These are: $(0 ; 2),(0 ;-2),(4 ; 23),(4 ;-23)$.