Show that if $\displaystyle 2^{m} + 1$ is an odd prime, then $\displaystyle m = 2^{n}$ for some n in natural integers.
Simple proof. x^(2n + 1) + 1 has a factorization, as (x + 1) * (x^2n - x^(2n - 1) + x^(2n - 2) - ....). Consider x = 2. If 2^m + 1 is an odd prime, then that means, it does not have such factorization possible, that means the power is not an odd number. But, even when it is an even number, if it has an odd factor o, one can factorize it like this and still apply this rule.
m = oe, where e is an even number). And so.
x^m + 1 = x^eo + 1 = (x^e)^o + 1 = (x^e + 1) (.....), which implies that it is not a prime number.
So, if 2^m + 1 is a prime number, m does not have "any" odd factors. That means, m = 2^n for some n in natural number.
Salahuddin
Maths online