# Proof that $2^n-1$ does not always generate primes when primes are plugged in for $n$?

Exactly what the name entails. The function $2^n-1$ I see largely tends to generate primes when $n$ is prime. However, a week ago I heard that this was horribly false. Please show me a disproof.

• Often when you want to prove something like this isn't true, you just search for examples. – Cameron Williams Jul 5 '15 at 5:16
• you only need one case to disprove something, like a truth table in this case going to infinity. – miniparser Jul 5 '15 at 5:38
• Even though experimental evidence strongly suggests that for most primes, $2^p-1$ is not prime, it has not been shown that there are infinitely many primes $p$ such that $2^p-1$ is not prime. – André Nicolas Jul 5 '15 at 5:45

$$\Large 2^{11}-1=23\cdot 89$$ Take a look at the Wikipedia page on Mersenne primes. There are (currently) only $48$ known prime numbers $p$ such that $2^p-1$ is prime, after people have used computers to check millions.