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.

\begin{align}
a^2 &= 7*2^k + 1 \\
\Rightarrow (a^2 - 1) = (a - 1)(a+1) &= 7*2^k \\
\text{For } k > 2: (\frac{a-1 }{2}) (\frac{a+1}{2}) &= 7*2^{k-2} \\
\text{Let } d = (\frac{a-1 }{2}) &\Rightarrow d + 1 = (\frac{a+1}{2}).\\ 
\Rightarrow  d(d+1) &= 7*2^n (n  = k - 2\in \mathbb{N})\\
gcd(d,d+1) = 1 &\Rightarrow (d,d+1) = (7,2^n) \text{ or } (2^n,7) \\
\text{ Only answer possible is } n = 3 &\Leftrightarrow k = 5 \text{ if } k > 2.\\
k = 1,2 \text{ do not satisfy, check individually. }
\end{align}
