4. Solve the equation $2^{x}=3^{y}+1$ in integers.
Solution 1. Since $3^{y}+1>1$, then $x>0$, which means $x \geqslant 1$. Therefore, $2^{x} \geqslant 2$, from which $3^{y} \geqslant 1$, hence $y \geqslant 0$. When $y=0$, we get $x=1$.

Let $y \geqslant 1$. The number $3^{y}+1$ when divided by 3 has a remainder of 1, so the number $x=2n$ is even. Then $2^{2n}-1=\left(2^{n}-1\right)\left(2^{n}+1\right)=3^{y}$, which means $2^{n}+1=3^{a}$ and $2^{n}-1=3^{b}$. Therefore, $3^{a}-3^{b}=2$, which is only possible when $a=1$ and $b=0$. Thus, $x=2$ and $y=1$.

Answer: $(1 ; 0),(2 ; 1)$.