Determine all ordered pair (x,y) of positive integers such that $y^{2}−(x+ 2)2^x=1$. This is what I have come up so far,

*

*y has to be odd. Since $(x+2)  2^{x}$ is always even, hence $(x+2)2^x+1$ is always odd. Thus, y must be an odd number.


*$$y^2 \equiv1(mod 4)$$Since all square numbers either congruent to 0 or 1 (mod 4), but $y^2$ is odd, it has to be congruent to 1 (mod 4).
After re-writing $y=2k+1$, I am able to use quadratic formula to get k in term of x $$k=\frac{-4\pm\sqrt{16+(4)(4)(x+2)(2^x)}}{8}$$ So far, I only know that $x=5,y=15$ is a solution. I would greatly appreciate if anyone can help.

$y^2 - 1 = (x+2)2^x$
$(y-1)(y+1)= (x+2)2^x$.
Now $y- 1, y+2$ must both be even and $\gcd(y-1,y+1) = 2$ so
So one of $y-1$ or $y+1$ must be divisible by $2$ but not any higher power of $2$.  And the other must be divisible by a power of $2$ that is at least $2^{x-1}$.
The very least the term divisible by $2^{x-1}$ can be is $2^{x-1}$.  And the very most the other term, that is only divisible by $2$ and no higher power, can be is $2(x+2)$.  But for significantly large $x$ we will have $2^{x-1} > 2(x+2)$.  However the difference between the terms, $y+1$ and $y-1$ is fixed at $2$.
So we can find an upper bound for the possible value of $x$.
$2^{x-1} - 2(x+2)$ can not be more than $2$.
A bit of mucking $2^{x-1} - 2(x+2) \le 2$ means $2^{x-1} \le 2x + 6$ means $2^{x-2} \le x + 3$ and for $x =5$ we have $2^{5-2} = 5 + 3$ but $2^{6-2} > 6+3$ and by induction we can just say that $2^{x-2}$ will double as $x$ increases by $1$ whereas $x+3$ will only increase by $1$.
So we must have $x \le 5$.
So just try them.
What we are looking for is that $(y-1)(y+1) = (x+2)2^x = [2m]\cdot [N]$ where $m$ is odd and $N$ is divisible by at least $2^{x-1}$ and the difference between $N$ and $2m$ is exactly $2$.
$x= 5$ gives us a perfect $(x+2)2^x = 7\cdot 32 = (2\cdot 7)\cdot 2^4$ where $2^4 - 2\cdot 7 = $ exactly $2$ so $y-1=14; y+1 = 16$ and $y = 15$ is a solution.
No others work.
$x =4$ gives us $(x+2)2^x= 6\cdot 16=\begin{cases}(2\cdot 3)\cdot 16\\(2\cdot 1)\cdot 48\end{cases}$ neither gives us a difference of $2$.
$x= 3$ gives us $(x+2)2^x = 5\cdot 8= (10)\cdot 4=2\cdot 20$ which fails.  As does $x=2$ ($(x+2)2^x=16 =2\cdot 8$) and $x=1$ ($(x+2)2^x= 6=6\cdot 1$... this really fails as when $y$ is odd $(y-1)(y+1)$ is always divisible by $8$).
$x= 5; y = 15$ is the only solution.
