Why do Mersenne numbers work?

157 Views Asked by At

In Matt Parker's book: "Things to make and do in the fourth dimension", he says that mathematicians have long known that for $2^n - 1$, if $n$ is not prime then the number cannot be prime. I don't understand how this works? $2^4-1=15$, and $4$ is not prime? $2^6-1=63$ and $63$ is not prime?

Can someone explain why we use Mersenne numbers? Is there some rule that I don't know about that it only works for numbers of a certain size? Why doesn't it work for the examples I just listed?

Edit: My brain stopped working and I forgot to check math. I was originally told by a family member that $2^4-1=31$ but I only just realized that indeed, it is $15$. And I forgot that $15$'s not prime lol. Also forgot $63$ ain't prime. Thanks for everyone's responses.

1

There are 1 best solutions below

0
On

Here's a few things:

  • $2^{n+1}-1=2(2^n-1)+1\land 1=2^1-1\implies 2^{n+m}-1=2^m(2^n-2)+(2^m-1)$

  • $n\mid 2^{n-1}-1 \implies 2^n-1=2kn+1$ , which is guaranteed for $n>2$ if $n$ is prime.

  • We know that if the prime has remainder $3$ on division by $4$, and twice it plus $1$ is prime, then it won't form a prime as an exponent.

They are mostly curios, but they do coincide with even perfect numbers. There are other things we can say, but aren't nearly as helpful.