{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $n$ be a positive integer.\nThe Farey sequence $F_n$ of order $n$ is the increasing sequence of all fractions $\\frac{a}{b}$ with $0 \\le a \\le b \\le n$ and $\\gcd(a, b) = 1$.\nEach fraction is in lowest terms, and $F_n$ starts with $\\frac{0}{1}$ and ends with $\\frac{1}{1}$.\n\n## Remarks\n\nFor example, $F_5 = \\left( \\frac{0}{1}, \\frac{1}{5}, \\frac{1}{4}, \\frac{1}{3}, \\frac{2}{5}, \\frac{1}{2}, \\frac{3}{5}, \\frac{2}{3}, \\frac{3}{4}, \\frac{4}{5}, \\frac{1}{1} \\right)$.\nIf $\\frac{a}{b} \u003c \\frac{c}{d}$ are neighbours in $F_n$, then $bc - ad = 1$.\nThe length of $F_n$ is $1 + \\sum_{k=1}^{n} \\varphi(k)$, with $\\varphi$ [[Euler's totient function|0VV04M41AN]].\nThe sequences are named after John Farey, whose letter about them appeared in 1816.\n\n## Explanations\n\n### L1 human\n\nWrite all fractions between $0$ and $1$ with denominators up to $n$, in lowest terms and in increasing order.\nNeighbouring fractions in this list are always very close in a precise sense: their cross difference is $1$.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "0XRDYJQES6",
    "kind": "definition",
    "msc": [
      "11B57"
    ],
    "name": "Farey sequence",
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Farey_sequence"
      }
    ],
    "tag": "0PN4QJE969",
    "uses": [
      "02WF878BH1"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0PN4QJE969/",
  "links": [
    {
      "field": "defines",
      "target": "0XRDYJQES6"
    },
    {
      "field": "uses",
      "target": "02WF878BH1"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0PN4QJE969.md",
  "msc": [
    "11B57"
  ],
  "name": "Farey sequence",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0PN/0PN4QJE969.md",
  "status": null,
  "tag": "0PN4QJE969",
  "uri": "m2://0PN4QJE969",
  "url": "https://math2.tamnd.com/wiki/farey-sequence-definition/",
  "writing": {
    "tag": "0PN4QJE969",
    "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
      }
    ]
  }
}
