When is $2^n -7$ a perfect square?
The equation $$2^n-7=x^2$$ is called the Ramanujan–Nagell equation. It has been conjectured by Ramanujan and proven by Nagell, and later others, that the only solutions are $n=3,4,5,7$ and $15$. Here are two proofs:
- one originally due to Hasse
- another by Wells Johnson
I believe all proofs make use of unique factorization in the ring of integers of $\mathbb{Q}(\sqrt{-7})$.