{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $p$ be a [[prime number|0SN0MAEKYX]], and let $m$ and $n$ be natural numbers with base-$p$ digits $m = \\sum_{i=0}^{k} m_i p^i$ and $n = \\sum_{i=0}^{k} n_i p^i$, where $0 \\le m_i, n_i \u003c p$.\nThen\n$$\\binom{m}{n} \\equiv \\prod_{i=0}^{k} \\binom{m_i}{n_i} \\pmod p,$$\nwith the convention $\\binom{a}{b} = 0$ when $b \u003e a$.\n\n## Remarks\n\nA consequence: $p \\mid \\binom{m}{n}$ if and only if $n_i \u003e m_i$ for some digit $i$.\nFor example, with $p = 3$: $10 = 101_3$ and $4 = 011_3$. The theorem gives $\\binom{10}{4} \\equiv \\binom{1}{0} \\binom{0}{1} \\binom{1}{1} = 0 \\pmod 3$, and indeed $\\binom{10}{4} = 210$.\nFor $p = 2$, the binomial coefficient $\\binom{m}{n}$ is odd if and only if $m$ has a binary digit $1$ at each place where $n$ has one.\n\n## History\n\nÉdouard Lucas published the theorem in 1878.\n\n## Explanations\n\n### L1 human\n\nTo find a binomial coefficient modulo a prime $p$, write both numbers in base $p$.\nThen compute small binomial coefficients digit by digit and multiply them.\nThis explains the pattern of odd numbers in Pascal's triangle, which looks like the Sierpiński triangle.\n",
  "commit": "545acf83a9b75c8ddc375ef8b23d2ae101a4d7e4",
  "front": {
    "kind": "statement",
    "msc": [
      "11B65"
    ],
    "name": "Lucas's theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q1186808",
      "wikipedia": "Lucas's theorem"
    },
    "sources": [
      {
        "locator": "Statement",
        "url": "https://en.wikipedia.org/wiki/Lucas%27s_theorem"
      }
    ],
    "tag": "0RY4GGMEQG",
    "uses": [
      "0TPW25CBN6",
      "0SN0MAEKYX"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0RY4GGMEQG/",
  "links": [
    {
      "field": "uses",
      "target": "0TPW25CBN6"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0RY4GGMEQG.md",
  "msc": [
    "11B65"
  ],
  "name": "Lucas's theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0RY/0RY4GGMEQG.md",
  "status": null,
  "tag": "0RY4GGMEQG",
  "uri": "m2://0RY4GGMEQG",
  "url": "https://math2.tamnd.com/wiki/lucass-theorem/",
  "writing": {
    "tag": "0RY4GGMEQG",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
