<s>[INST] Solve $2^m=7n^2+1$ Solve $2^m=7n^2+1$ with $(m,n)\in \mathbb{N}^2$
Here is what I did:
First try, I have seen first that the obvious solutions are $n=1$ and $m=3$ , and $n=3$ and $m=6$, then I proved by simple congruences that $m$ must be divisible by $3$ so $m=3k$, If we add $27$ to the equation we will have $2^{3k}+3^3=7(n^2+2^2)$, but unfortunately I tried to do something with Legendre symbol or the multiplicative order but I found nothing interesting.
Second try,I let $n=2k+1$ then I worked in $\mathbb{Z}\left[ \frac{-1+\sqrt{-7}}{2} \right] $ and the equation becomes $7\times 2^{m-2}=\left( 7k+4+\frac{-1+\sqrt{-7}}{2} \right) \left( 7k+3-\frac{-1+\sqrt{-7}}{2} \right) $ but I didn't find something interesting because the two factors are not coprime.
 [/INST] HINT
$2^m\equiv 1$ mod $7$ and so $m=3k$. For $n>0$, we now have
$$2^k-1=au^2, 2^{2k}+2^k+1=bv^2$$
where either $\{a,b\}=\{1,7\}$ or $\{a,b\}=\{3,21\}.$
Each of the four possibilities gives an elliptic curve $$bv^2=3+3au^2+a^2u^4.$$
Of these, the case $a=7,b=1$ is impossible modulo $7$. 
</s>