{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "02M2K4QH9P"
    },
    {
      "field": "uses",
      "target": "0BMXWXDVJZ"
    },
    {
      "field": "uses",
      "target": "0M7DEDKSYB"
    },
    {
      "field": "uses",
      "target": "0SZCSYHW60"
    },
    {
      "field": "uses",
      "target": "0Y4B7P0GS8"
    }
  ],
  "body": "\n## Statement\n\nLet $p$ be a [[prime number|0SN0MAEKYX]] and let $a$ be an integer that $p$ does not divide.\nThen $a^{p-1} \\equiv 1 \\pmod p$.\n\n## Remarks\n\nAn equivalent form is [[Fermat's little theorem in the form a^p = a|0BMXWXDVJZ]]: $a^p \\equiv a \\pmod p$ for each integer $a$.\nIn the ring $\\mathbb{Z}/p\\mathbb{Z}$, the statement is $x^{p-1} = 1$ for each nonzero $x$. It follows from [[Lagrange's theorem|3C53TD]] for the multiplicative [[group|G5S1M9]] of $\\mathbb{Z}/p\\mathbb{Z}$, which has $p - 1$ elements.\n[[Euler's theorem|0VC4DVE7DQ]] generalizes the result to each modulus $n$.\nThe converse is false. For example, $2^{340} \\equiv 1 \\pmod{341}$, but $341 = 11 \\cdot 31$. See [[Fermat pseudoprime|02M2K4QH9P]].\n\n## History\n\nFermat stated the theorem in a letter of 1640, without a proof. Euler published the first known proof in 1736. Leibniz had a proof earlier, in an unpublished manuscript.\n\n## Explanations\n\n### L1 human\n\nTake $p = 5$ and $a = 2$: $2^4 = 16 = 3 \\cdot 5 + 1$, so $2^4 \\equiv 1 \\pmod 5$.\nThe theorem says that this always happens for a prime $p$ and a number $a$ that $p$ does not divide.\nIt lets you reduce large powers: $2^{100} = (2^4)^{25} \\equiv 1 \\pmod 5$.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "statement",
    "msc": [
      "11A07"
    ],
    "name": "Fermat's little theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q188295",
      "wikipedia": "Fermat's little theorem"
    },
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Fermat%27s_little_theorem"
      }
    ],
    "tag": "0M25PRN3WQ",
    "uses": [
      "0SN0MAEKYX",
      "0TPW25CBN6"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0M25PRN3WQ/",
  "links": [
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "0TPW25CBN6"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0M25PRN3WQ.md",
  "msc": [
    "11A07"
  ],
  "name": "Fermat's little theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0M2/0M25PRN3WQ.md",
  "status": null,
  "tag": "0M25PRN3WQ",
  "uri": "m2://0M25PRN3WQ",
  "url": "https://math2.tamnd.com/wiki/fermats-little-theorem/",
  "writing": {
    "tag": "0M25PRN3WQ",
    "kind": "statement",
    "level": "W1",
    "next": [
      {
        "what": "edge about out",
        "note": "the concepts that the statement is about",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge proves in",
        "note": "at least one proof node",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or illustrates in",
        "note": "one example that shows the statement at work",
        "have": 0,
        "want": 1
      },
      {
        "what": "explanation L2",
        "have": 0,
        "want": 1
      }
    ]
  }
}
