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.
Suppose $m>n$ and $k$ is an integer such that $$(2^{n+1}+k)^2= 2^{2n+2}+2^{m+2}+1.$$ This means $$2^{n+2}k+k^2=2^{m+2}+1$$ so $$(k-1)(k+1)=k^2-1=2^{n+2}(2^{m-n}-k).$$ Note that clearly $k$ must be odd and $\gcd(k-1,k+1)=2$, so either $k-1$ or $k+1$ is divisible by $2^{n+1}$. Since $k>1$ (if $k=1$ we would have $m=n$), this means that $k\geq 2^{n+1}-1$. Plugging this into the second equation above gives $$2^{m+2}+1\geq 2^{n+2}(2^{n+1}-1)+(2^{n+1}-1)^2=2^{2n+3}+2^{2n+2}-2^{n+3}+1.$$ As long as $n\geq 1$ (the case $n=0$ is trivial) we have $2n+2\geq n+3$ so we can conclude $$2^{m+2}\geq 2^{2n+3}$$ and thus $m\geq 2n+1$.
Thus, if $n<m\leq 2n$, then no such integer $k$ can exist and $2^{2n+2}+2^{m+2}+1$ is not a perfect square.