{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nLet $a \u003e 1$ and $b \u003e 1$ be [[coprime|0GFKP8F8AG]] integers. Put $N = ab - a - b$. Here \"natural number\" includes $0$.\n\n**Part 1: $N$ is not of the form $ax + by$.**\n\n1. Suppose $N = ax + by$ with natural numbers $x$ and $y$. Then $ab = a(x + 1) + b(y + 1)$.\n2. So $b(y + 1) = a(b - x - 1)$, and $a$ divides $b(y + 1)$.\n3. Since $a$ and $b$ are coprime, [[the generalized Euclid's lemma|03BAREW1Z5]] gives $a \\mid y + 1$. As $y + 1 \\ge 1$, this forces $y + 1 \\ge a$.\n4. In the same way, $a(x + 1) = b(a - y - 1)$, so $b \\mid x + 1$ and $x + 1 \\ge b$.\n5. Then $ab = a(x + 1) + b(y + 1) \\ge ab + ab = 2ab$. This is false, since $ab \u003e 0$. So no such $x$ and $y$ exist.\n\n**Part 2: every integer $n \u003e N$ is of the form $ax + by$.**\n\n6. By [[Bézout's identity|0DQVHMYAGA]], there are integers $u$ and $v$ with $au + bv = 1$. So $a u \\equiv 1 \\pmod b$.\n7. Let $n \u003e N$ be an integer. By the [[division algorithm|0CHQKZFK5S]], there is an $x$ with $0 \\le x \\le b - 1$ and $x \\equiv nu \\pmod b$.\n8. Then $ax \\equiv anu \\equiv n \\pmod b$, so $y = (n - ax)/b$ is an integer, and $n = ax + by$.\n9. Since $x \\le b - 1$, we get $n - ax \\ge n - a(b - 1) \u003e N - ab + a = -b$.\n10. So $by = n - ax \u003e -b$, and $y \u003e -1$. As $y$ is an integer, $y \\ge 0$.\n11. So $x$ and $y$ are natural numbers with $n = ax + by$.\n\n## Idea\n\nFor the first part, a representation of $ab - a - b$ would force $x + 1 \\ge b$ and $y + 1 \\ge a$ by divisibility, which overshoots $ab$. For the second part, choose $x$ in $\\set{0, \\dots, b - 1}$ to make $n - ax$ divisible by $b$. The bound $n \u003e ab - a - b$ is exactly what makes the remaining $y$ nonnegative.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11D07"
    ],
    "name": "Proof of the Frobenius coin problem for two coins",
    "proves": "0V11FEXK08",
    "sources": [
      {
        "locator": "n = 2",
        "url": "https://en.wikipedia.org/wiki/Coin_problem"
      }
    ],
    "tag": "7THCHQQM1A",
    "uses": [
      "0GFKP8F8AG",
      "03BAREW1Z5",
      "0DQVHMYAGA",
      "0CHQKZFK5S"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/7THCHQQM1A/",
  "links": [
    {
      "field": "proves",
      "target": "0V11FEXK08"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "uses",
      "target": "03BAREW1Z5"
    },
    {
      "field": "uses",
      "target": "0DQVHMYAGA"
    },
    {
      "field": "uses",
      "target": "0CHQKZFK5S"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/7THCHQQM1A.md",
  "msc": [
    "11D07"
  ],
  "name": "Proof of the Frobenius coin problem for two coins",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/7TH/7THCHQQM1A.md",
  "status": null,
  "tag": "7THCHQQM1A",
  "uri": "m2://7THCHQQM1A",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-frobenius-coin-problem-for-two-coins/",
  "writing": {
    "tag": "7THCHQQM1A",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
