<s>[INST] Is my proof correct? $2^n=x^2+23$ has an infinite number of (integer) solutions. This is how I tried to prove it. Is it correct? Thanks!!
$2^n = x^2+23$
$x^2$ must be odd, therefore $x^2 = 4k+1$, where $k \in \mathbb{N}$.
$2^n=4k+24$
$k=2(2^{n-3}-3)$
Since $x^2=4k+1$,$ \ \ \ \ $ $k_1 = \frac{x_1^2-1}{4}$
and $k_2=\frac{(x_1+2)^2-1}{4}=\frac{x_1^2+4x_1+3}{4}$
If we substitute $x_1^2=4k_1 + 1$, we end up with:
$k_2=k_1 + \sqrt{4k_1+1} + 1$
Therefore, finding solutions of $k=2(2^{n-3} - 3)$ is comparable to
finding the solutions of $k+\sqrt{4k+1}+1=2(2^{n-3}-3)$
Let $p=2(2^{n-3}-3)$
Therefore, $(\sqrt{4k+1})^2=(p-k-1)^2$, so
$(p-k)^2 = 2(p+k)$
Since $p$ has an infinite number of solutions $(p-k)^2=2(p+k)$ also has an infinite number of solutions, which implies  the the original does also.
 [/INST] There are only finitely many solutions.  Pillai's conjecture is overkill because it allows for all possible exponents simultaneously, whereas the solutions of $2^n = x^2 + 23$ must lie on one of the three curves $y^3 = x^2+23$, $2y^3 = x^2+23$, $4y^3= x^2+23$, each of which has finitely many integer points.
</s>