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
 A: 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$.
A: Here is at least a partial solution to your problem. $2^a+5^b\mod 2=1$ no matter what $a,b$ you choose. Thus $2^a+5^b$ is an odd number. Now squares of even numbers are even and squares of odd numbers are odd. Thus, if $2^b+5^b$ is a square, it is the square of an odd number. The last digit of a square of an odd number has to be one, five or nine. Since $2^a+5^b\mod 5$ is either $2$ or $4$ and $1,5,9\mod 5 = 1,0,4$. Moreover, $2^a+5^b\mod 5 =4$ if and only if $a$ is even. Can you proceed from here?
