MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This may be subjective, but does anyone have any insight into why this is the case? This struck me while considering that it's also the eigth Mersenne prime (2^31-1=2147483647).

I'm now wondering why this might be the case.

UPDATE: It's been pointed out that the relationship doesn't necessarily hold for larger storage classes, e.g., 2^63 - 1 is not prime.

share|cite|improve this question
Not for 64 bit, 63 is composite. – Will Jagy Aug 27 '10 at 2:43
Thanks, good point. – Joseph Weissman Aug 27 '10 at 2:44
I'm going to say that I doubt there's a Fermat's conjecture that $2^{2^n}+1$ is always prime, there can be a few random examples, but it doesn't always mean that there is a pattern. – David Corwin Aug 27 '10 at 2:46
127 is prime, but 255, 511, 1023, 2047, 4095 are composite. 8191 is prime again. 16383, 32767, 65535 are composite. 131071 is prime. – Will Jagy Aug 27 '10 at 2:54
It really would help if you switched to symbols. I think by largest unsigned value you mean $$ 2^{2^n} - 1 $$ which is always divisible by 3. – Will Jagy Aug 27 '10 at 3:22
up vote 7 down vote accepted

Why is $3$ prime? I don't really know that there are meaningful answers to these kinds of questions. The best I can think of is some reasons it is not obviously composite, e.g. since $5$ is prime $2^5 - 1 = 31$ is not obviously composite (and it turns out to be prime) hence $2^{31} - 1$ is not obviously composite. This is two applications of the "lemma" that if $p$ is prime then $2^p - 1$ is not obviously composite.

Note that any prime factor of $2^p - 1$ has to be congruent to $1 \bmod p$ by Fermat's little theorem, so it is "easier" for such numbers to be prime.

share|cite|improve this answer
Thank you so much! – Joseph Weissman Aug 27 '10 at 3:33

The Largest 64 bit prime is 18446744073709551557, according to See also

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.