Find all pairs of positive integers $(a, b)$ such that $2^{a}+3^{b}$ is the square of an integer.
Considering the equality $2^{a}+3^{b}=n^{2}$ modulo 3 it is easy to see that $a$ must be even. Obviously $n$ is odd so we may take $a=2 x, n=2 y+1$ and write the equality as $4^{x}+3^{b}=(2 y+1)^{2}=4 y^{2}+4 y+1$. Hence $3^{b} \equiv 1(\bmod 4)$ which implies $b=2 z$ for some positive integer $z$. So we get $4^{x}+9^{z}=(2 y+1)^{2}$ and $4^{x}=\left(2 y+1-3^{z}\right)\left(2 y+1+3^{z}\right)$. Both factors on the right-hand side are even numbers but at most one of them is divisible by 4 (since their sum is not divisible by 4 ). Hence $2 y+1-3^{z}=2$ and $2 y+1+3^{z}=2^{2 x-1}$. These two equalities yield $2 \cdot 3^{z}=2^{2 x-1}-2$ and $3^{z}=4^{x-1}-1$. Clearly $x>1$ and a simple argument
modulo 10 gives $z=4 d+1, x-1=2 e+1$ for some non-negative integers $d$ and $e$. Substituting, we get $3^{4 d+1}=4^{2 e+1}-1$ and $3 \cdot(80+1)^{d}=4^{2 e+1}-1$. If $d \geq 1$ then $e \geq 1$, a contradiction (expanding the left-hand expression and moving everything to the left we find that all summands but one are divisible by $4^{2}$ ). Hence $e=d=0, z=1, b=2, x=2$ and $a=4$, and we obtain the classical $2^{4}+3^{2}=4^{2}+3^{2}=5^{2}$.