{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe prove the contrapositive: if $n$ is not prime, then $2^n - 1$ is not prime.\n\n1. Let $n$ be a natural number that is not a [[prime number|0SN0MAEKYX]]. Then $n = 0$, $n = 1$, or $n$ is composite.\n2. If $n = 0$, then $2^n - 1 = 0$. If $n = 1$, then $2^n - 1 = 1$. Neither $0$ nor $1$ is prime.\n3. Let $n$ be composite. Then $n = ab$ with integers $a$ and $b$ such that $1 \u003c a \u003c n$ and $1 \u003c b \u003c n$.\n4. For every number $x$ and every integer $b \\ge 1$, $(x - 1)(1 + x + x^2 + \\dots + x^{b-1}) = x^b - 1$. Indeed, the product telescopes: $\\sum_{i=0}^{b-1} (x^{i+1} - x^i) = x^b - 1$.\n5. Put $x = 2^a$. Then $2^n - 1 = x^b - 1 = (2^a - 1) \\cdot s$, where $s = 1 + 2^a + \\dots + 2^{a(b-1)}$ is a positive integer.\n6. So $2^a - 1$ [[divides|096PW7Q014]] $2^n - 1$.\n7. Since $1 \u003c a \u003c n$, we have $1 \u003c 2^2 - 1 \\le 2^a - 1 \u003c 2^n - 1$.\n8. So $2^n - 1$ has a divisor strictly between $1$ and itself, and it is not prime.\n9. By contraposition, if $2^n - 1$ is prime, then $n$ is prime.\n\n## Idea\n\nIf $n = ab$, then $2^n - 1 = (2^a)^b - 1$, and $y - 1$ always divides $y^b - 1$. This gives a proper factor $2^a - 1$ of $2^n - 1$. So a composite exponent never gives a prime.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11A41"
    ],
    "name": "Proof that if 2^n − 1 is prime then n is prime",
    "proves": "07MMWAXMYD",
    "sources": [
      {
        "locator": "Theorems about Mersenne numbers",
        "url": "https://en.wikipedia.org/wiki/Mersenne_prime"
      }
    ],
    "tag": "EBPYD73Y8S",
    "uses": [
      "0SN0MAEKYX",
      "0GJBJ19NXR",
      "096PW7Q014"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/EBPYD73Y8S/",
  "links": [
    {
      "field": "proves",
      "target": "07MMWAXMYD"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "0GJBJ19NXR"
    },
    {
      "field": "uses",
      "target": "096PW7Q014"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/EBPYD73Y8S.md",
  "msc": [
    "11A41"
  ],
  "name": "Proof that if 2^n − 1 is prime then n is prime",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/EBP/EBPYD73Y8S.md",
  "status": null,
  "tag": "EBPYD73Y8S",
  "uri": "m2://EBPYD73Y8S",
  "url": "https://math2.tamnd.com/wiki/proof-that-if-2-n-1-is-prime-then-n-is-prime/",
  "writing": {
    "tag": "EBPYD73Y8S",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
