{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe prove the contrapositive: if $n$ is not a power of $2$, then $2^n + 1$ is not prime.\n\n1. Let $n$ be a positive integer. By the [[fundamental theorem of arithmetic|084HH1NDCB]], $n = 2^k m$ with $k \\ge 0$ and $m$ a positive odd integer.\n2. Assume $n$ is not a power of $2$. Then $m \\ne 1$, so $m \\ge 3$.\n3. Put $x = 2^{2^k}$, so that $2^n + 1 = x^m + 1$ and $x \\ge 2$.\n4. For odd $m$, $(x + 1)(x^{m-1} - x^{m-2} + \\dots - x + 1) = x^m + 1$. Indeed, the product is $\\sum_{i=0}^{m-1} (-1)^{m-1-i} (x^{i+1} + x^i)$, which telescopes to $x^m + (-1)^{m-1} = x^m + 1$.\n5. So $x + 1$ [[divides|096PW7Q014]] $2^n + 1$.\n6. We have $x + 1 \\ge 3 \u003e 1$. Also $x + 1 \u003c x^m + 1$, because $x \\ge 2$ and $m \\ge 3$ give $x^m \u003e x$.\n7. So $2^n + 1$ has a divisor strictly between $1$ and itself, and it is not a [[prime number|0SN0MAEKYX]].\n8. By contraposition, if $2^n + 1$ is prime, then $n = 2^k$ for a natural number $k$.\n9. Then $2^n + 1 = 2^{2^k} + 1$, which is the [[Fermat number|0R03B54V4Z]] $F_k$. So every prime of the form $2^n + 1$ with $n \\ge 1$ is a Fermat number.\n\n## Idea\n\nAn odd factor $m \u003e 1$ of the exponent lets us factor $y^m + 1$ by $y + 1$, because $-1$ is a root of $y^m + 1$ when $m$ is odd. This gives a proper divisor. So only exponents with no odd factor, the powers of $2$, can give primes.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "msc": [
      "11A41"
    ],
    "name": "Proof that if 2^n + 1 is prime then n is a power of 2",
    "proves": "0VN4H8M12X",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Fermat_number"
      }
    ],
    "tag": "KFVHE9P0K9",
    "uses": [
      "0SN0MAEKYX",
      "0R03B54V4Z",
      "084HH1NDCB",
      "096PW7Q014"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/KFVHE9P0K9/",
  "links": [
    {
      "field": "proves",
      "target": "0VN4H8M12X"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "0R03B54V4Z"
    },
    {
      "field": "uses",
      "target": "084HH1NDCB"
    },
    {
      "field": "uses",
      "target": "096PW7Q014"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/KFVHE9P0K9.md",
  "msc": [
    "11A41"
  ],
  "name": "Proof that if 2^n + 1 is prime then n is a power of 2",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KFV/KFVHE9P0K9.md",
  "status": null,
  "tag": "KFVHE9P0K9",
  "uri": "m2://KFVHE9P0K9",
  "url": "https://math2.tamnd.com/wiki/proof-that-if-2-n-1-is-prime-then-n-is-a-power-of-2/",
  "writing": {
    "tag": "KFVHE9P0K9",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
