This is a necessary step in a problem I am working on.
-
6$n=1$ is a counterexample. – Asinomás May 02 '15 at 22:27
-
3Hint: Prove this similar statement: $2^n+1 \equiv 0 \pmod 3$ for all odd $n$. – Fengyang Wang May 02 '15 at 22:27
-
1You can factor a sum of two $k$th powers, where $k$ is odd. – GEdgar May 02 '15 at 22:29
-
These primes are sometimes called fermat primes – Asinomás May 02 '15 at 22:35
2 Answers
$n$ has to be a power of $2$.
suppose $n$ is not a power of $2$, then let $n=dk$ with $d$ odd.
Then $2^n+1=(2^k)^d+1=(2^k)^d+1^d$ ,now use the high school factorization for $x^d +y^d$ which is true when $d$ is odd that says $x^d+y^d=(x+y)(x^{d-1}-x^{d-2}y+x^{d-3}y^2\dots +y^{d-1})$.
In this case $x=2^k$ and $y=1$.
We get:
$(2^k)^d+1=(2^k+1)((2^k)^{d-1}-(2^{k})^{d-2}+(2^k)^{d-3}\dots +1)$ This tells us our number is not prime.
Fenyang Wang gives a simpler way to prove the number must be even.
this is because if it was odd it would be a multiple of three, and the only prime multiple of three is three.
However it is useful to note the number has to be a power of two, since powers of two are a lot scarcer than even numbers. Also notice that in my solution you can exchange $2$ for any positive integer other than $2$.

- 105,651
-
Shouldn't you verify that none of the factors (in the final expression) are units? – GPerez May 02 '15 at 23:24
-
-
This is because of the high-school identity: $$x^n+1=(x+1)(x^{n-1}-x^{n-2}+\dots-x+1),$$ which is valid if and only if $n$ is odd.

- 175,478