How to find all positive integers $m,n$ such that $3^m+4^n$ is a perfect square? How to find all positive integers $m$, $n$ such that $3^m+4^n$ is a perfect square? I have found $m=n=2$ is a solution, but cannot find any other and cannot prove whether there is any other solution or not. Please help. Thanks in advance.
 A: Since $3=-1$ modulo $4$ and $3^2=1$ modulo $4$ the sum $3^m+4^n$ can only be a square when $m$ is even. Therefore we want that
$$(3^j)^2+ (2^n)^2$$
is a square. Using the formula for Pythagorean triples we see that necessarily
$$3^j=p^2-q^2,\qquad 2^n=2pq\ .$$
It follows that $p=2^r$, $q=2^s$ with $r\geq s\geq0$ and therefore
$$3^j=2^{2r}-2^{2s}=2^{2s}(2^{2(r-s)}-1)\ .$$
This implies $s=0$ and $3^j=(2^r+1)(2^r-1)$. Here not both factors on the right hand side can be nontrivial powers of $3$; whence $r=1$ and then $j=1$.
It follows that $3^2+4^2=25$ is the only solution to the problem.
A: $$ 3^m+4^n = q^2 \tag{1}$$
can be written as:
$$ 3^m = (q-2^n)(q+2^n) \tag{2}$$
so $(1)$ is fulfilled any time we have that two powers of three differ by a power of two:
$$ 3^A-3^B = 2^C. \tag{3} $$
Obviously that may happen only if $B=0$, because otherwise the LHS of $(3)$ is a multiple of three while the RHS is not. However, by Zsigmondy's theorem the only solutions of:
$$ 3^A-1 = 2^C \tag{4}$$
are given by $A=2,C=3$, leading to $m=n=2,q=5$, and by $A=1,C=1$, leading to $m=1,n=0,q=2$.
