4

When $2^n-1$ is prime and $n>2$ then $n$ is prime. Then, when $2^n-1$ is prime, why $2^n+1$ is composite?

What I have done is this.

Let's suppose $2^n+1$ is prime, then it will be contradiction.

But I can't proceed any more

egreg
  • 238,574
nien
  • 445

2 Answers2

3

$$x^{2m+1}+1=(x+1)(x^{2m}-x^{2m-1}+x^{2m-2}-\dots-x+1).$$ So $2^n+1$ is divisible by $3$ id $n$ is odd (whether prime or not).

Of course this also can be found with congruences modulo $3$ , if you note $2\equiv -1\mod3$.

Bernard
  • 175,478
2

It is not true. A counterexample is $n=2$, when both of $2^n-1=3$ and $2^n+1=5$ are prime.

That is the only counterexample, though -- it requires a Fermat prime and a Mersenne prime with the same exponent, and the exponent in a Fermat prime is always a power of 2, whereas that for a Mersenne prime is always prime.