{
  "aliases": [
    "primitive-root"
  ],
  "backlinks": [
    {
      "field": "uses",
      "target": "01TKKESHSB"
    },
    {
      "field": "uses",
      "target": "04XGKK8WQW"
    },
    {
      "field": "uses",
      "target": "09B4X51J09"
    },
    {
      "field": "uses",
      "target": "0E0DNQK22P"
    }
  ],
  "body": "\n## Definition\n\nLet $n$ be a positive integer.\nA primitive root modulo $n$ is an integer $g$ coprime to $n$ whose [[multiplicative order|0SBRX5CZ5R]] modulo $n$ is $\\varphi(n)$, where $\\varphi$ is [[Euler's totient function|0VV04M41AN]].\n\n## Remarks\n\nEquivalently, $g$ is a primitive root modulo $n$ when the powers $g, g^2, \\dots, g^{\\varphi(n)}$ represent all the residue classes coprime to $n$.\nSo a primitive root exists exactly when the group $(\\mathbb{Z}/n\\mathbb{Z})^\\times$ is cyclic, and then $\\overline{g}$ generates this group.\nFor example, $3$ is a primitive root modulo $7$: its powers are $3, 2, 6, 4, 5, 1$ modulo $7$.\nThere is no primitive root modulo $8$: each odd $a$ satisfies $a^2 \\equiv 1 \\pmod 8$, but $\\varphi(8) = 4$.\n\n## Explanations\n\n### L1 human\n\nA primitive root is a number whose powers run through all the residues coprime to $n$ before they come back to $1$.\nModulo $5$, the powers of $2$ are $2, 4, 3, 1$. So $2$ is a primitive root modulo $5$, but $4$ is not, since $4^2 \\equiv 1$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "aliases": [
      "primitive-root"
    ],
    "defines": "0F33KX9Q6F",
    "kind": "definition",
    "msc": [
      "11A07"
    ],
    "name": "Primitive root modulo n",
    "sources": [
      {
        "locator": "Definition",
        "url": "https://en.wikipedia.org/wiki/Primitive_root_modulo_n"
      }
    ],
    "tag": "0KM2CJ80G7",
    "uses": [
      "0SBRX5CZ5R",
      "0VV04M41AN"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0KM2CJ80G7/",
  "links": [
    {
      "field": "defines",
      "target": "0F33KX9Q6F"
    },
    {
      "field": "uses",
      "target": "0SBRX5CZ5R"
    },
    {
      "field": "uses",
      "target": "0VV04M41AN"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0KM2CJ80G7.md",
  "msc": [
    "11A07"
  ],
  "name": "Primitive root modulo n",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0KM/0KM2CJ80G7.md",
  "status": null,
  "tag": "0KM2CJ80G7",
  "uri": "m2://0KM2CJ80G7",
  "url": "https://math2.tamnd.com/wiki/primitive-root-modulo-n-definition/",
  "writing": {
    "tag": "0KM2CJ80G7",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
