Are there infinitely many square numbers of the form $2^p + k$? Given an integer of the form: $N=(2^p+k)$ where


*

*$N$ is a square number.

*$k \leq p$

*$k$ and $p$ are positive integers.


How difficult is it to prove that there are infinite numbers $N$ that satisfy the above constraint? Is something like this already known?
 A: Following on from quarague's answer, the spacing of squares at that point is $2\cdot \sqrt 2 \cdot 2^q+1$ and we need to be within $2q$ of one, so the chance of a particular $q$ satisfying it is $\frac {2q}{2^{q+1}\sqrt 2+1}$.  If we sum this to infinity we get $\sqrt 2$ so we only expect a few.
$$p=3, 3^2=2^3+1\\
p=5, 6^2=2^5+4$$
may be all there are.  There are no others by $p=95$, where Excel runs out of precision.
A: Only a partial answer but hopefully still useful. 
First I will assume you mean $k \ge 1$ because otherwise every even $p$ with $k=0$ will give a square. 
If $p$ is even, that is $p=2q$, then $2^{2q}$ is a square and the next square is $(2^q+1)^2$ which is bigger than $2^{2q}+2q$ for all $q$. Hence there are no squares of the form $2^p+k$ with $k \le p$ if $p$ is even.
If $p$ is odd, that is $p=2q+1$, there could be squares of that form but I would expect there to be only finitely many solutions. One would need $\lceil \sqrt{2}\cdot 2^q \rceil \le \sqrt{2^{2q+1}+2q+1}$ where $\lceil . \rceil$ denotes the ceiling, ie the next biggest integer. 
