## Task B-3.4.

Determine all pairs of natural numbers $a$ and $b$ such that $a^{2}-4 b^{2}=a-2 b+2^{2022}$.
## Solution.

The given equation can be written in the form $(a-2 b)(a+2 b-1)=2^{2022}$, from which it follows that $a+2 b-1=2^{x}$ and $a-2 b=2^{y}$, where $x$ and $y$ are non-negative integers.

Furthermore, since $a$ and $b$ are natural numbers, it is clear that $a+2 b-1>a-2 b$, i.e., $x>y \geqslant 0$.

Moreover, since $2^{x}+2^{y}=a+2 b-1+a-2 b=2 a-1$ is an odd number, it must be that $y=0$, i.e., $a-2 b=1$.

From $y=0$ it follows that $x=2022$.

Thus, we obtain the system

$$
\left\{\begin{array}{l}
a+2 b-1=2^{2022} \\
a-2 b=1
\end{array}\right.
$$

By solving the obtained system, we find $a=2^{2021}+1$ and $b=2^{2020}$.