4

I was wondering why I can't do this this way by proof by contradiction of the contrapositive. So I want to prove
$$2^n + 1 \quad \text{is prime} \implies n = 2^k \quad \text{for some} \ k\in \mathbb{Z}.$$
By contrapositive,
$$n \neq 2^k \quad \text{for all} \ k \in \mathbb{Z} \implies 2^n + 1 \quad \text{is composite.}$$

Then I want to prove by contradiction:
Suppose $n \neq 2^k \quad \forall k\in \mathbb{Z}$ and $2^n + 1$ is prime.
Why can't I give one counterexample to prove that this is false (contradiction)?
Since if $n:= 3$ then $2^3 + 1 = 9$ which is composite, hence, $2^n + 1$ being prime (hypothesis) cannot be true, so by proof by contradiction, $2^n +1$ must be composite?

nonuser
  • 91,557
  • 2
    Because you have to prove it for all $k \in \mathbb{Z}$. – Math Lover Aug 15 '17 at 04:18
  • Strictly speaking you also need $n\gt 0$, because $2^0 + 1 = 2$ is prime (but $0$ is not a power of $2$). – hardmath Aug 15 '17 at 04:33
  • 2
    You want to "prove" that All Nordic women have blonde hair by exhibiting a Chinese lady with black hair? – Jyrki Lahtonen Aug 15 '17 at 04:45
  • @Math Lover I think it should be for all $k\in\mathbb N$. – Michael Rozenberg Aug 15 '17 at 04:53
  • Hint: If $n$ is not a power of $2$, there is an odd $d>1$ such that $d\mid n$. – Thomas Andrews Aug 15 '17 at 04:53
  • @MichaelRozenberg Yes, you are right. It should be $k \in \mathbb{N}$. – Math Lover Aug 15 '17 at 05:23
  • Do you really think that showing that $2^3+1$ is composite in this way shows that $2^5+1$ is composite or $2^6+1$ or $2^7+1$? – Mark Bennet Aug 15 '17 at 06:08
  • @ClaudeLeibovici: I find the choice of duplicate proposed to be bizarre. Fermat primes are not (with the exception of $3$) Mersenne primes. There is a Comment (the first under the Question) in the proposed duplicate connecting them, but neither the body of that Question or any of its Answers are pertinent here. – hardmath Aug 16 '17 at 01:46

2 Answers2

9

Suppose there is an odd prime such that $p|n$. Then $n=p\cdot k$ for some natural $k$. Now we have: $$ 2^{pk}+1 =(2^k+1)(2^{k(p-1)}-2^{k(p-2)}+...-2^k+1)$$

Clearly both factors are $> 1$ and thus a contradiction.

nonuser
  • 91,557
4

The question isn't to show that there is one $n$ that is not a power of $2$ with $2^n+1$ composite, it is to show that for every $n$ that is not a power of $2$, $2^n+1$ is composite.

Robert Israel
  • 470,583