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.
 A: Since $7\cdot 2^k+1$ is odd we have that
$$7\cdot 2^k+1=(2n+1)^2=4n^2+4n+1 \iff7\cdot 2^k=2^2n(n+1) \iff 7\cdot 2^{k-2}=n(n+1)$$
and since one among $n$ and $n+1$ must be odd therefore amd since $7$ is prime,  one of them must be equal to $7$ and then the unique solution is $2^{k-2}=8 \implies k=5$.
A: \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}
A: $$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$

