{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\n1. Let $p$ be a [[prime number|0SN0MAEKYX]]. By definition, [[Euler's totient function|0VV04M41AN]] $\\varphi(p)$ is the number of integers $x$ with $1 \\le x \\le p$ that are [[coprime|0GFKP8F8AG]] to $p$.\n2. Let $x$ be an integer with $1 \\le x \\le p$, and let $d = \\gcd(x, p)$ be the [[greatest common divisor|02WF878BH1]]. It is a positive divisor of $p$.\n3. Since $p$ is prime, its only positive divisors are $1$ and $p$. So $d = 1$ or $d = p$.\n4. If $x \\le p - 1$, then $0 \u003c x \u003c p$, so $p$ does not divide $x$. Since $d$ divides $x$, $d \\ne p$, and so $d = 1$.\n5. If $x = p$, then $d = \\gcd(p, p) = p$. Since $p \u003e 1$, $p$ is not coprime to itself.\n6. By steps 4 and 5, the integers in $\\{ 1, \\dots, p \\}$ that are coprime to $p$ are exactly $1, 2, \\dots, p - 1$.\n7. Hence $\\varphi(p) = p - 1$.\n\n## Idea\n\nA prime has no divisors other than $1$ and itself. So every positive integer below $p$ shares no factor with $p$, and only $p$ itself is left out.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "methods": [
      "0NTF6DMVAP"
    ],
    "msc": [
      "11A25"
    ],
    "name": "Proof of the formula for the totient of a prime",
    "proves": "0HY1MXMEN9",
    "sources": [
      {
        "locator": "Value of phi for a prime power argument",
        "url": "https://en.wikipedia.org/wiki/Euler%27s_totient_function"
      }
    ],
    "tag": "KXWTG4M4S4",
    "uses": [
      "0VV04M41AN",
      "0SN0MAEKYX",
      "02WF878BH1",
      "0GFKP8F8AG"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/KXWTG4M4S4/",
  "links": [
    {
      "field": "proves",
      "target": "0HY1MXMEN9"
    },
    {
      "field": "uses",
      "target": "0VV04M41AN"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "02WF878BH1"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "methods",
      "target": "0NTF6DMVAP"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/KXWTG4M4S4.md",
  "msc": [
    "11A25"
  ],
  "name": "Proof of the formula for the totient of a prime",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KXW/KXWTG4M4S4.md",
  "status": null,
  "tag": "KXWTG4M4S4",
  "uri": "m2://KXWTG4M4S4",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-formula-for-the-totient-of-a-prime/",
  "writing": {
    "tag": "KXWTG4M4S4",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
