Math 2.0

Number theory Proof

Proof that if 2^n − 1 is prime then n is prime

Builds on Prime numberMersenne numberDivisibility

Proof

We prove the contrapositive: if nn is not prime, then 2n−12^n - 1 is not prime.

  1. Let nn be a natural number that is not a prime number. Then n=0n = 0, n=1n = 1, or nn is composite.
  2. If n=0n = 0, then 2n−1=02^n - 1 = 0. If n=1n = 1, then 2n−1=12^n - 1 = 1. Neither 00 nor 11 is prime.
  3. Let nn be composite. Then n=abn = ab with integers aa and bb such that 1<a<n1 < a < n and 1<b<n1 < b < n.
  4. For every number xx and every integer b≥1b \ge 1, (x−1)(1+x+x2+⋯+xb−1)=xb−1(x - 1)(1 + x + x^2 + \dots + x^{b-1}) = x^b - 1. Indeed, the product telescopes: ∑i=0b−1(xi+1−xi)=xb−1\sum_{i=0}^{b-1} (x^{i+1} - x^i) = x^b - 1.
  5. Put x=2ax = 2^a. Then 2n−1=xb−1=(2a−1)⋅s2^n - 1 = x^b - 1 = (2^a - 1) \cdot s, where s=1+2a+⋯+2a(b−1)s = 1 + 2^a + \dots + 2^{a(b-1)} is a positive integer.
  6. So 2a−12^a - 1 divides 2n−12^n - 1.
  7. Since 1<a<n1 < a < n, we have 1<22−1≤2a−1<2n−11 < 2^2 - 1 \le 2^a - 1 < 2^n - 1.
  8. So 2n−12^n - 1 has a divisor strictly between 11 and itself, and it is not prime.
  9. By contraposition, if 2n−12^n - 1 is prime, then nn is prime.

Idea

If n=abn = ab, then 2n−1=(2a)b−12^n - 1 = (2^a)^b - 1, and y−1y - 1 always divides yb−1y^b - 1. This gives a proper factor 2a−12^a - 1 of 2n−12^n - 1. So a composite exponent never gives a prime.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Divisibility definition
  2. Mersenne number definition
  3. Prime number definition
  4. Proof that if 2^n − 1 is prime then n is prime proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Mersenne_prime, Theorems about Mersenne numbers
About this page
TagEBPYD73Y8S
URIm2://EBPYD73Y8S
Kindproof
WritingW0 stub
MSC11A41
ProvesIf 2^p − 1 is prime then p is prime
UsesPrime number, Mersenne number, Divisibility
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.