Find all pairs of positive integers $(a,b)$ such that $2^a+5^b$ is a perfect square. How do you solve such questions when they appear? 
I know that this problem involves quadratic residues. Moreover, I also know that a=2,b=1 is possible. It may also be the only solution
I tried to take $\pmod{5}$ of this equation but it didn't really help me. I would appreciate if someone could post a solution to this problem.
Thank You

If $2^a+5^b = m^2$, then $m^2\equiv 0, 1, 4\pmod{5}$. $0$ is impossible since $2^a$ is never divisible by 5, so $2^a+5^b\equiv 2^a \equiv 1, 4\pmod{5}$. This implies that $a$ is even, say $a=2k$. This gives $5^b = m^2-2^{2k} = (m-2^k)(m+2^k)$, which implies that both $m-2^k$ and $m+2^k$ are powers of $5$, say
$$m-2^k = 5^r,\ m+2^k=5^s, r<s\quad\Rightarrow\quad 2^{k+1} = 5^s-5^r.$$
But $5^s-5^r$ is divisible by 5 for $r>0$, so it cannot be a power of two unless $r=0$. 
Thus any solution must have $m=2^k+1$, $m+2^k = 5^b$, so that $5^b = 2^{k+1}+1$, or $5^b-2^{k+1}=1$. By Mihăilescu's theorem, either $b\le 1$ or $k+1\le 1$. Since $b$ is a positive integer, we get $b=1$, whence $2^{k+1}=4$ and $k=1$, so $a=2$.
