Find all positive integers $x$ and $y$ such that $3^{x}+7=2^{y}$.
Modulo 3, we get that $(-1)^{y}=1$ so $y$ is even: $y=2 y^{\prime}$. If $y=0$, we have $3^{x}<0$ so there are no solutions. Otherwise $y \geq 2$ and modulo 4 we get $3^{x} \equiv 1[4]$. But $3^{x}=(-1)^{x}[4]$ so $x=2 x^{\prime}$. Hence $7=\left(2^{y^{\prime}}+3^{x^{\prime}}\right)\left(2^{y^{\prime}}-3^{x^{\prime}}\right)$. So $2^{y^{\prime}}+3^{x^{\prime}}=7$ and $2^{y^{\prime}}-3^{x^{\prime}}=1$ thus by summing $2 \times 2^{y^{\prime}}=8$ so $y^{\prime}=2$ and $x^{\prime}=1$. The only solution is therefore $(x, y)=(2,4)$.