{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nLet $n \\ge 1$ and $F = F_n = 2^{2^n} + 1$, a [[Fermat number|0R03B54V4Z]]. Put $e = (F - 1)/2 = 2^{2^n - 1}$. Congruences are [[modulo|0TPW25CBN6]] $F$ unless stated.\n\n**If $F$ is prime, then $3^e \\equiv -1$.**\n\n1. Since $n \\ge 1$, we have $2^n \\ge 2$, so $4$ divides $2^{2^n}$. Hence $F \\equiv 1 \\pmod 4$, and $F \\ge 5$.\n2. Also $2^{2^n} = 4^{2^{n-1}} \\equiv 1 \\pmod 3$. Hence $F \\equiv 2 \\pmod 3$.\n3. Assume $F$ is [[prime|0SN0MAEKYX]]. Then $F$ and $3$ are distinct odd primes.\n4. By the [[law of quadratic reciprocity|085MJS6907]], with [[Legendre symbols|01J8AMV9RS]], $\\left(\\frac{3}{F}\\right)\\left(\\frac{F}{3}\\right) = (-1)^{1 \\cdot e} = 1$, because $e$ is even.\n5. The squares modulo $3$ are $0^2 \\equiv 0$, $1^2 \\equiv 1$ and $2^2 \\equiv 1$. So $F \\equiv 2$ is a [[quadratic nonresidue|0SQDB87Z3T]] modulo $3$, and $\\left(\\frac{F}{3}\\right) = -1$.\n6. By step 4, $\\left(\\frac{3}{F}\\right) = -1$.\n7. By [[Euler's criterion|0M7DEDKSYB]], $3^e \\equiv \\left(\\frac{3}{F}\\right) = -1 \\pmod F$.\n\n**If $3^e \\equiv -1$, then $F$ is prime.**\n\n8. Assume $3^e \\equiv -1 \\pmod F$. A common divisor of $3$ and $F$ divides $3^e$ and $3^e + 1$, hence divides $1$. So $\\gcd(3, F) = 1$.\n9. So the class $[3]$ lies in the group $G = (\\Z/F\\Z)^\\times$ of [[units|05THZKR9AN]], by [[the units of Z/nZ|0GXNHEHQNA]]. Let $r$ be its order in $G$.\n10. Squaring the assumption gives $3^{2e} = 3^{F-1} \\equiv 1$. By [[the order criterion|0F5QC101Q7]], $r$ divides $F - 1 = 2^{2^n}$. So $r = 2^j$ with $0 \\le j \\le 2^n$.\n11. If $j \u003c 2^n$, then $r$ divides $e = 2^{2^n - 1}$, so $3^e \\equiv 1$. With $3^e \\equiv -1$ this gives $F \\mid 2$, which is false since $F \\ge 5$.\n12. So $r = 2^{2^n} = F - 1$.\n13. The [[order of an element divides the order of the group|08V7JHS3QZ]]. The group $G$ has $\\varphi(F)$ elements, by [[the order of the units group|0S7495H4HM]]. So $F - 1 \\le \\varphi(F)$.\n14. By the definition of [[Euler's totient function|0VV04M41AN]], $\\varphi(F)$ counts integers $k$ with $1 \\le k \\le F$ coprime to $F$. The integer $k = F$ is not coprime to $F \u003e 1$, so $\\varphi(F) \\le F - 1$.\n15. Hence $\\varphi(F) = F - 1$, and each $k$ with $1 \\le k \\le F - 1$ is coprime to $F$.\n16. If $d$ were a divisor of $F$ with $1 \u003c d \u003c F$, then $\\gcd(d, F) = d \u003e 1$, contrary to step 15. So $F$ is prime.\n\n## Idea\n\nIf $F_n$ is prime, quadratic reciprocity shows that $3$ is not a square modulo $F_n$, and Euler's criterion turns this into the congruence. Conversely, the congruence makes the order of $3$ equal to $F_n - 1$. Only a prime modulus has that many units.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11Y11"
    ],
    "name": "Proof of Pépin's test",
    "proves": "07HXA8KV6F",
    "sources": [
      {
        "locator": "Proof of correctness",
        "url": "https://en.wikipedia.org/wiki/P%C3%A9pin%27s_test"
      }
    ],
    "tag": "5F18K7X480",
    "uses": [
      "0R03B54V4Z",
      "0TPW25CBN6",
      "0SN0MAEKYX",
      "01J8AMV9RS",
      "0SQDB87Z3T",
      "085MJS6907",
      "0M7DEDKSYB",
      "0GXNHEHQNA",
      "05THZKR9AN",
      "0F5QC101Q7",
      "08V7JHS3QZ",
      "0S7495H4HM",
      "0VV04M41AN"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/5F18K7X480/",
  "links": [
    {
      "field": "proves",
      "target": "07HXA8KV6F"
    },
    {
      "field": "uses",
      "target": "0R03B54V4Z"
    },
    {
      "field": "uses",
      "target": "0TPW25CBN6"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "01J8AMV9RS"
    },
    {
      "field": "uses",
      "target": "0SQDB87Z3T"
    },
    {
      "field": "uses",
      "target": "085MJS6907"
    },
    {
      "field": "uses",
      "target": "0M7DEDKSYB"
    },
    {
      "field": "uses",
      "target": "0GXNHEHQNA"
    },
    {
      "field": "uses",
      "target": "05THZKR9AN"
    },
    {
      "field": "uses",
      "target": "0F5QC101Q7"
    },
    {
      "field": "uses",
      "target": "08V7JHS3QZ"
    },
    {
      "field": "uses",
      "target": "0S7495H4HM"
    },
    {
      "field": "uses",
      "target": "0VV04M41AN"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/5F18K7X480.md",
  "msc": [
    "11Y11"
  ],
  "name": "Proof of Pépin's test",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/5F1/5F18K7X480.md",
  "status": null,
  "tag": "5F18K7X480",
  "uri": "m2://5F18K7X480",
  "url": "https://math2.tamnd.com/wiki/proof-of-pepins-test/",
  "writing": {
    "tag": "5F18K7X480",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
