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.
 A: 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.
A: I get $x=\pm 3$ and $x = \pm 45$ and that's it. It is likely that the set of solutions is finite, see PILLAI'S CONJECTURE There is a fine description of how Pillai's conjecture would be written by @ShreevatsR in comment below:

that "for fixed positive integers A,B,C the equation $Ax^n−By^m=C$ has
  only finitely many solutions $(x,y,m,n)$ with $(m,n) \neq (2,2).$"
  Here with $(A,B,C)=(1,1,23)$ it says that $x^n−y^m=23$ has finitely
  many integer solutions $(x,y,m,n).$ The OP's claim is that it has
  infinitely many integer solutions of the form $(2,x,2,n).$ This is
  probably false

Meanwhile, I can describe how to rapidly exhaust possible solutions, by my methods. We know that $n$ must be odd in $x^2 - 2^n = -23.$ So, take $n= 2t+1$ and make a new variable, $y= 2^t.$ The result is $$ x^2 - 2 y^2 = -23. $$ The seed values are $(x,y) = (3,4)$ and  $(x,y) = (-3,4).$ We want all solutions such that $y$ turns out to be a power of 2. Now, given a solution $(x,y),$ we get all possible solutions by repeatedly taking the result of applying an element of the automorphism group/isometry group/orthogonal group of $x^2 - 2 y^2,$ namely $$ (3x-4y,-2x+3y).  $$ 
Now, $y=4$ is a power of 2, so that is a start, with $x=\pm 3$
The first string is $$ (3,4), (-7,6), (-45,32),(-263,186),(-1533,1084),(-8935,6318), \ldots    $$
So this one gives $$ (x = \pm 3, y = 4), \; \; \;  (x = \pm 45, y = 32) $$ as successes
The other string is
$$ (-3,4),(-25,18),(-147,104), (-857,606),(-4995,3532),(-29113,20586), \ldots  $$
So you can see how I became skeptical about there being any more solutions with $y$ a power of 2. 
Note that Erick Wong has pointed out a proof as a simple application of elliptic curves. 
Meanwhile, I am now awake, see KATY PERRY.
A: This seems wrong to me.
You went from
$k_1 = \frac{x_1^2-1}{4}$
to $x_1^2 = 4 k_1^2+1$.
Somehow the $k_1$ got squared.
This is not a correct proof.
Also, having to download that big image is a pain.
Please learn how to enter math in $\LaTeX$.
A: Here is another heuristic argument along probabilistic lines that there are finitely many solutions.
The distance between perfect squares near $n$ is approximately $2\sqrt{n}$. Thus, the probability of a given integer $n$ to be a perfect square is approximately $\frac1{2\sqrt{n}}$. Summing the probability that $2^n-23$ is a perfect square gives
$$
\begin{align}
\sum_{n=5}^\infty\frac1{2\sqrt{2^n-23}}
&\le\frac16+\sum_{n=6}^\infty\frac1{2\sqrt{2^{n-1}}}\\
&=\frac16+\frac{\sqrt2+1}8
\end{align}
$$
According to the Borel-Cantelli Lemma, this indicates that the probability that there are finitely mny solutions is $1$.
Of course, this really proves nothing, because the same argument suggests that there are finitely many perfect squares of the form $2^n$, when in fact $2^n$ is a perfect square whenever $n$ is even. However, in the absence of proof to the contrary, this provides a decent guess.
A: The substitution $x^2=4k^2+1$ was wrong because $x^2=4k+1$, but nevertheless the next line is correct as if I've substituted the correct thing. The actual problem of the proof comes from when I said "$p$ has infinitely many solutions". I was thinking that $p$ is just an integer, and clearly $2(2^{n-3}-3)$ outputs a positive integer when $n$ is at least $5$. That's why I said that $p$ has an infinite number of solutions. However, I did not realize that since $p=k+\sqrt{4k+a}+1$, I'm already assuming that $2(2^{n-3}-3)=k+\sqrt{4k+a}+1$ has an infinite number of solutions, which would be implied if I was actually correct.Therefore this is a circular argument. But I do have one question about a certain step. Was it correct when I said that  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)$?
