# Is it true that $2^{p}-1$ is a prime number?

Let $p$ be an odd prime such that $$p \equiv 1 \pmod{4}$$ and $p$ and $p-2$ form a twin prime pair.

My question: Is it true that $2^{p}-1$ is a prime number?

• If there exists an integer $r > 1$ such that $r^n - 1$ is a prime number for some integer $n > 1$, then $r = 2$. Otherwise $r-1\,|\,r^n-1$ and thus $r^n-1$ is composite. – Ben Frankel Oct 13 '14 at 14:46
• @BenFrankel: I have corrected the question. – DER Oct 13 '14 at 14:48
• One of your conditions is unnecessary! If $p$ is a sum of two squares then it is automatically the hypotenuse of a right angled triangle... – fretty Oct 13 '14 at 14:54
• You can delete the hypotenuse condition and also replace the first condition by $p \equiv 1 \bmod 4$ (since by Fermat we have that $p$ is a sum of two squares if and only if $p=2$ or $p\equiv 1 \bmod 4$, and clearly $2^2-1 = 3$ is prime). – fretty Oct 13 '14 at 14:56
• @fretty: But $p>2$. – DER Oct 13 '14 at 15:03

## 4 Answers

You are saying "if so-and-so is true, does it follow that $2^p-1$ is a Mersenne prime? "

Of the numbers of the form $2^p-1$, only very few are primes. Most exponents p up to 50 million have been examined and it was found in most cases that $2^p-1$ is not prime; there are less than 50 known exceptions. That information is easy to find.

You could just use this information, try out all twin primes (p-2, p) where p = 1 (modulo 4) and see quite quickly that $2^p-1$ is actually very rarely a prime. The first four values for p are 5, 61, 73, 109, and only the first two give Mersenne primes.

It is false. Counterexample: $73$.

$$73 - 2 = 71\;\text{is prime}$$

$$73 = 8^2 + 3^2$$

$$73^2 = 55^2 + 48^2$$

$$2^{73} - 1 = 439×2298041×9361973132609$$

Note that $r^{p}-1=(r-1)(r^{p-1}+...+r+1)$. This can only be prime if $r=2$.

The question you are asking is if those conditions imply that $2^p-1$ is a mersene prime.

• @ N.S.: I have corrected the question. – DER Oct 13 '14 at 14:49

$2^p-1$ can be only a prime number if $p$ is prime, but not for every prime number $p$ is $2^p-1$ a prime number.