# Difference between revisions of "2006 IMO Problems/Problem 4"

### Problem

Determine all pairs $(x, y)$ of integers such that $$1+2^{x}+2^{2x+1}= y^{2}.$$

### Solution

If $(x,y)$ is a solution then obviously $x\geq 0$ and $(x,-y)$ is a solution too. For $x=0$ we get the two solutions $(0,2)$ and $(0,-2)$.

Now let $(x,y)$ be a solution with $x > 0$; without loss of generality confine attention to $y > 0$. The equation rewritten as $$2^x(1+2^{x+1}) = (y-1)(y+1)$$ shows that the factors $y-1$ and $y+1$ are even, exactly one of them divisible by $4$. Hence $x\geq 3$ and one of these factors is divisible by $2^{x-1}$ but not by $2^x$. So $$y = 2^{x-1}m + \varepsilon, \qquad m\text{ odd},\qquad \varepsilon = \pm 1.\qquad\qquad(*)$$ Plugging this into the original equation we obtain $$2^x(1+2^{x+1}) = (2^{x+1}m + \varepsilon)^2 - 1 = 2^{2x-2}m^2 + 2^xm\varepsilon,$$ or, equivalently $$1 + 2^{x+1} = 2^{x-2}m^2 + m\varepsilon.$$ Therefore $$1 - \varepsilon m = 2^{x-2}(m^2 - 8).\qquad(\dagger)$$ For $\varepsilon = 1$ this yields $m^2 - 8 < 0$, i.e. $m=1$, which fails to satisfy $(\dagger)$. For $\varepsilon = -1$ equation $(\dagger)$ gives us $$1 + m = 2^{x-2}(m^2 - 8) \geq 2(m^2 - 8),$$ implying $2m^2 - m - 17 \leq 0$. Hence $m\leq 3$; on the other hand $m$ cannot be $1$ by $(\dagger)$. Because $m$ is odd, we obtain $m=3$, leading to $x=4$. From $(*)$ we get $y=23$. These values indeed satisfy the given equation. Recall that then $y = -23$ is also good. Thus we have the complete list of solutions $(x,y)$: $(0,2)$, $(0,-2)$, $(4,23)$, $(4,-23)$.