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.
http://olympiads.win.tue.nl/imo/imo2006/solutions.pdf

I remember this problem instantly because i was an IMO contestant.
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 &gt; 0 \iff 9 - 8y^2 &gt; 0 \iff y^2 &lt; \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 &gt; 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$.