A Mersenne prime is a prime of the form $2^n-1$. A Fermat prime is a prime of the form $2^n+1$. Despite the two being superficially very similar, it is conjectured that there are infinitely many Mersenne primes but only finitely many Fermat primes.
Here is my inquiry:
QUESTION: Is $3$ the only prime that is both a Mersenne prime and a Fermat prime?
MY ATTEMPT
The prime $3$ is of the form $$3 = 2^2 - 1 = 2^{2^0} + 1$$ which shows that it is both a Mersenne prime and a Fermat prime.
However, I am having trouble proving that it is the only such prime.
Edited in response to an earlier closure of this question due to lack of context: (February 08, 2022 - 12:34 AM)
My main motivation for having asked this question was to check whether an odd perfect number could be divisible by some prime that is both a Mersenne prime and a Fermat prime. As the excellent answers so show, $3$ is the only such prime. However, (and this is the main caveat why I did not include this context earlier) it is currently unknown whether $3$, or whether any prime below $105$ for that matter, does divide an odd perfect number. To quote (or paraphrase, as I am currently unsure of the exact wording of) another mathematician's remark over at MathOverflow: "Such a result would be a major breakthrough in our understanding of odd perfect numbers."
Regardless of primeness, Fermat-ness or Mersenne-ness, no natural number other than $3$ is simultaneously one larger than a power of two and also one smaller than a power of two (that requires two powers of two that are $2$ apart, and that only happens for $2^1$ and $2^2$).
$3$ also happens to be prime, and the relevant powers of $2$ happen to be such that $3$ is both Mersenne and Fermat.