Determine all pairs $(m, n)$ of positive integers such that $2^{m}+1=n^{2}$
We move the 1 to the other side to factorize: $2^{m}=n^{2}-1=(n+1)(n-1)$. Since $n+1>0$, we have $n-1>0$. Thus, $n+1$ and $n-1$ are powers of 2 because 2 is prime. Therefore, we have $n+1=2^{a}$ and $n-1=2^{b}$ with $a>b$, so $2^{a}-2^{b}=2=2^{b}\left(2^{a-b}-1\right)$. Thus, we must have $b \leqslant 1$ because $2^{b} \mid 2$, and by parity, $b=1$. We then find that $n=1+2^{b}=3$, so $2^{m}=3^{2}-1=8$, hence $m=3$. Conversely, we indeed have $2^{3}+1=9=3^{2}$, so $(3,3)$ is the unique solution pair.