Solve the following equation in positive integers $x$ and $y$ What are the solutions in positive integers of the equation: 
$${1+2^x+2^{2x+1}=y^2}$$
I tried to factorize the equation but it didn't help much.
Clearly $y $ is an odd integer. Substituting $y =2n+1$, we get 
$2^x+2^{2x+1}=(2n)\cdot{(2n+2)}$
$\Rightarrow (2^{x-2})\cdot(1+2^{x+1})=(n)\cdot(n+1)$
Which is the product of 2 consecutive integers. Does it help? I don't know.
 A: http://olympiads.win.tue.nl/imo/imo2006/solutions.pdf
I remember this problem instantly because i was an IMO contestant. 
A: $1+2^x+2^{2x+1}=y^2$ or $1+2^{(x-1)+1}+2^{2(x-1)+3}=y^2$ or $1+2*2^{(x-1)}+8*2^{2(x-1)}=y^2$. Now, let $p=2^{(x-1)}$, then, $1+2p+p^2+7p^2=y^2$ or $(p+1)^2=y^2-7p^2$ , this a Rational Pell equation, now, it can be shown that any such Pell equation has solutions; $(r^2-d)^2=(r^2+d)^2-d(2r)^2$. Hence, by comparison, $d=7$, $p(=2^{(x-1)})=2r$, $y=r^2+7$ and $p+1=r^2-7$, from these equations we get; $8=r^2-2r=r(r-2)$. Hence, $r=4=2^{(x-2)}$. $x=4$, $y=23$. This is the only non-trivial integer solution.
A: Let $2^x = z$, then: $2z^2 + z + y^2 - 1 = 0$.
Calculate $\triangle = 1^2 - 4\cdot 2\cdot (y^2 - 1) = 9 - 8y^2$.
$\triangle > 0 \iff 9 - 8y^2 > 0 \iff y^2 < \dfrac{9}{8} = 1.11$, so $y = 1$, and $\triangle = 1$. So $z = \dfrac{-1 \pm 1}{2\cdot 2} = 0$ or $-0.5$, but $z =2^x > 2$. So there is no solution.
In fact $\triangle = 1^2 - 4\cdot 2\cdot (1-y^2) = 8y^2 - 7$. Now we solve the Pell equation:
$8y^2 - 7 = k^2$ or $8y^2 - k^2 = 7$. This has an initial solution $(y_0,k_0) = (1,1)$. Using this we can generate the general solution, then we can find $z$, and then $x$.
