TITLE: When is $2^{2n+2}+2^{m+2}+1$ a perfect square?
QUESTION [5 upvotes]: Let $m,n$ be natural numbers satisfying $m\leq 2n$. Is it true that $$2^{2n+2}+2^{m+2}+1$$ is a perfect square if and only if $m=n$?
What I have tried: Under the assumption $m<n$, I've tried to 'squeeze' the above number between two consecutive squares, implying it cannot be a perfect square. This works fine because (writing $P(m,n)=2^{2n+2}+2^{m+2}+1$), we have $(2\cdot2^n)^2<P(m,n)<(2\cdot2^n+1)^2$. But this method doesn't work when $\frac{m}{2}\leq n<m$, and I wonder if there is any pair $(m,n)$ with $m\ne n$ making $P(m,n)$ a perfect square.
Any advice is welcome.

REPLY [3 votes]: Let $$2^{2n+2}+2^{m+2}+1=(2k+1)^2\text{where}\; k\ge 2\\
\implies 2^{2n}+2^m=k^2+k$$
For $m=2n$,  $2^{m+1}=k(k+1)$. All factors of $2^{m+1}$ are even but one of $k$ and $k+1$ is odd.  Hence $m\neq 2n$
For $m\lt 2n$, $2^m(2^{2n-m}+1)=k(k+1)$ The factors on both sides are co-prime.  So $k=2^m$ and $k+1=2^{2n-m}+1\implies m=n$ 
Or $k=2^{2n-m}+1$ and $k+1=2^m$ which means $k$ is one more and one less than powers of $2$ which is only possible if $k=3\implies n=\frac32$ which is impossible.
Hence, $2^{2n+2}+2^{m+2}+1$ is perfect square if and only if $m=n$