<s>[INST] diophantine equation $x^3+x^2-16=2^y$ Solve in integers: $x^3+x^2-16=2^y$.
my attempt:
of course $y\ge 0$, then $2^y\ge 1$, so $x\ge 1$.
for $y=0,1,2,3$ there is no good $x$.
so $y\ge 4$ and we have equation $x^2(x+1)=16(2^z+1)$, where $z=y-4\ge 0$.
what now?
 [/INST] This is only a solution for even values of $x$:
For $x$ even, $x^2$ is even and $x+1$ is odd. So $\gcd(16, x+1) = 1$. So $16 \mid x^2$. So $4 \mid x$. So $x = 4k$ for some $k$.
$16k^2(4k+1)=16(2^z+1)$
$k^2(4k+1)=2^z+1$
If $k$ is even then the RHS is even and we have a contradiction. So $k$ must be odd. So $k = 2t+1$ for some $t$.
$(2t+1)^2 (8t+5) = 2^z + 1$
$(4t^2 + 4t + 1)(8t + 5) = 2^z + 1$
$32t^3 + 52t^2 + 28t + 4 = 2^z$
We see $z \geq 2$. Let $w = z - 2$.
$8t^3 + 13t^2 + 7t + 1 = 2^w$
For $w \geq 1$, $t^2 + t + 1 \equiv 0 \pmod{2}$ which has no solution in $t$.
So $w = 0$.
$8t^3 + 13t^2 + 7t = 0$
$t(8t^2 + 13t + 7) = 0$
Take the discriminant of the quadratic, so we get $169 - 224 < 0$.
So $t = 0$ and $w = 0$.
So for $x$ even, $x = 4k = 4(2t + 1) = 4$ and $y = z + 4 = w + 6 = 6$.

You can also bound (bind?) $x$, giving it in terms of $y$. Go back to $x^3+x^2−16=2^y$. Consider $f(x,y) = x^3 + x^2 - 16 - 2^y$. Evaluate $f(2^{y/3},y) = 2^y + 2^{2y/3} - 16 - 2^y = 2^{2y/3} - 16$ which equals $0$ when $y = 6$ and is bigger than $0$ when $y > 6$. Evaluate $f(2^{y/3} - 1, y)$ which you can check here is less than $0$ for all $y$. This shows that if $x$ is an integer and $f(x,y) = 0$ then $x = \left \lfloor 2^{y/3} \right \rfloor$.
As far as working with $x = \left \lfloor 2^{y/3} \right \rfloor$, you can write it as $x = \left \lfloor 2^q2^{r/3} \right \rfloor$ where $0 \leq r < 3$  which can be expressed as $\left \lfloor 10_2^q 10_2^{r/3} \right \rfloor$ in binary. As $q$ increases (which increases $y$ by 3), the value of $x$ either gets doubled, or is double plus one. I'm not sure if that's useful.
How to finish this?
</s>