Find all the positive integers k for which $7 \times 2^k+1$ is a perfect square Find all the positive integers $k$ for which $7 \times 2^k+1$ is a perfect square.
The only value of $k$ I can find is $5$. I am not sure how to find every single one or the proof, I simply used trial and error.

$$7\times 2^k+1=n^2\iff7\times2^k=(n-1)(n+1)$$
$n$ must be odd so, $7\times 2^{k-2}=(\frac{n-1}{2})(\frac{n+1}{2})$ and $\gcd(\frac{n-1}{2},\frac{n+1}{2})=1$, since $\gcd(\frac{n-1}{2},\frac{n+1}{2})$ divides $\frac{n+1}{2}-\frac{n-1}{2}=1$.
This gives two possibilities:


*

*$\frac{n-1}{2}=7\Rightarrow n=225\Rightarrow 2^k=32$

*$\frac{n+1}{2}=7\Rightarrow n=169\Rightarrow 2^k=24$

