What are all the solutions to

$$2^{2x}+2^{2y}+1=n^2$$

I tried using the parametrization of Pythagorean Quadruples, but it did not work quite well.

There are $2$ parametrizations:

$(2np,2mp,p^2-n^2-m^2,p^2+n^2+m^2)$

Or $(mp+nq,np-mq,p^2+q^2-n^2-m^2,p^2+q^2+n^2+m^2)$

The problem is that the first one doesn't generate all solutions, but worked in my proof.So...any help?

EDIT:What we want to show is that the only solutions are

${(2^{2y-1}+1)}^2=4^{2y-1}+4^y+1$

• Do all the solutions have to be integers? – Peter Woolfitt Jan 29 '15 at 18:32
• Why Pythagorean Triples? Is it a hint to this question? – agha Jan 29 '15 at 18:37
• One solution would be $x=y=1$ $n=3$. – ghosts_in_the_code Jan 29 '15 at 18:41
• Sorry about that, I meant Pythagorean Quadruples – user211570 Jan 29 '15 at 18:46
• Source of the problem??? – Will Jagy Jan 29 '15 at 19:09

We must have $$4^x + 4^y = (n-1)(n+1) \tag{1}$$ and $\gcd(n-1,n+1)\leq 2$, so by assuming $x\geq y$ and rewriting $(1)$ as $$4^y\cdot\left(4^{x-y}+1\right) = (n-1)(n+1) \tag{2}$$ there are just a few cases to check.
• If $n$ is even, we must have $y=0$ and $4^x+2=n^2$, no hope. If $x-y\geq 1$ and $n$ is odd, we must have $(n\pm 1)=2(4^{x-y}+1)$ and $(n\mp 1)=2^{2y-1}$. If $x-y=0$, we must have $2\cdot 4^x+1 = n^2$, so $x=1$ and $n=3$. – Jack D'Aurizio Jan 29 '15 at 18:51