Finding solutions to $2^x+17=y^2$ 
Find all positive integer solutions $(x,y)$ of the following equation: 
  $$2^x+17=y^2.$$

If $x = 2k$, then we can rewrite the equation as $(y - 2^k)(y + 2^k) = 17$, so the factors must be $1$ and $17$, and we must have $x = 6, y = 9$.
However, this approach doesn't work when $x$ is odd.

$x=3,5,9$ work with $y=5,7,23$ but fail nor $x=1,7$.  If $x $ works for any other value then $x>4$.
$2^x+17=y^2$
$2^4 (2^{x-4}+1)=y^2-1=(y+1)(y-1) $
$y\pm 1$ must be even and $\gcd(x+1,x-1)=2$ and one is a multiple of $4$ while the other isn't.
That means::
$y\pm 1=8m;y\mp 1=2n;mn=2^{x-4}+1$
Also means 
$2^x+8=y^2-9$
$2^3 (2^{x-3}+1)=(y-3)(y+3) $
So $y\mp 3 =4k=2n\mp 2;y\pm 3=2j=8m\pm 2;jk=2^{x-3}+1$
We have strict limitation here it seems.  In that $m,n $ are relatively close to $j,k $ but their product is about half.
I'm too lazy to work out the details but there must be an upper limit to that being possible.
Also $2^x-8=2^3 (2^{x-3}-1)=y^2-25=(y-5)(y+5) $ and so $y\pm 2 =4r;y\mp 2=2s;rs=jk-2$
So.... it's a mess but we have clear limits.  
I strongly suspect $x=9$ is the highest possible $x $.
Oh, and we have $2^x+1=(y-4)(y+4)\approx 16mn $.  
