{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $F(n, k)$ be a hypergeometric term in both variables, as in the definition of a [[WZ pair|WC0QNABPZ4]].\n*Zeilberger's algorithm* searches, for $J = 0, 1, 2, \\ldots$ in turn, for polynomials $a_0(n), \\ldots, a_J(n)$, not all zero, and a hypergeometric term $G(n, k)$ with $G/F$ rational, such that\n$$\\sum_{j=0}^{J} a_j(n)\\,F(n + j, k) = G(n, k + 1) - G(n, k).$$\nFor each $J$ it applies [[Gosper's algorithm|NHMJQBS04M]] to the term $t_k = \\sum_{j} a_j(n) F(n + j, k)$ in $k$, with unknown $a_j$.\nThe polynomial equation of Gosper's method is then linear in the $a_j$ and in the unknown coefficients of $x$.\nIt stops at the first $J$ for which a solution exists and returns the $a_j$ and $G$.\n\n## Remarks\n\nIf $F(n, k)$ vanishes for $k$ outside a finite range depending on $n$, summing the relation over all $k$ makes the right side a [[telescoping sum|0GXKM1R7E4]] equal to $0$.\nSo $f(n) = \\sum_k F(n, k)$ satisfies the [[recurrence|0FYX44GP92]] $\\sum_{j=0}^{J} a_j(n) f(n + j) = 0$.\nThe search terminates when $F$ is a proper hypergeometric term.\nSuch a term is a polynomial, times a product of factorials of integer-linear forms in $n$ and $k$, times $x^k$.\nThis termination result is part of the fundamental theorem of Wilf and Zeilberger.\nExample: for $F(n, k) = \\binom{n}{k}$ the algorithm stops at $J = 1$ with $a_0 = -2$, $a_1 = 1$ and $G(n, k) = -\\binom{n}{k - 1}$.\nCheck by Pascal's rule: $\\binom{n + 1}{k} - 2\\binom{n}{k} = \\binom{n}{k - 1} - \\binom{n}{k} = G(n, k + 1) - G(n, k)$, which gives $f(n + 1) = 2f(n)$.\nNon-example: for $J = 0$ no solution exists here, since that would need $\\sum_{j\u003ck}\\binom{n}{j}$ to be a hypergeometric term in $k$, and Gosper's algorithm shows it is not.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "VA7MH05Z3B",
    "kind": "definition",
    "msc": [
      "33F10",
      "05A19",
      "68W30"
    ],
    "name": "Zeilberger's algorithm",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Wilf%E2%80%93Zeilberger_pair"
      }
    ],
    "tag": "RWNTZ2AYA7",
    "uses": [
      "WC0QNABPZ4",
      "NHMJQBS04M",
      "0FYX44GP92",
      "0GXKM1R7E4"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/RWNTZ2AYA7/",
  "links": [
    {
      "field": "defines",
      "target": "VA7MH05Z3B"
    },
    {
      "field": "uses",
      "target": "WC0QNABPZ4"
    },
    {
      "field": "uses",
      "target": "NHMJQBS04M"
    },
    {
      "field": "uses",
      "target": "0FYX44GP92"
    },
    {
      "field": "uses",
      "target": "0GXKM1R7E4"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/RWNTZ2AYA7.md",
  "msc": [
    "33F10",
    "05A19",
    "68W30"
  ],
  "name": "Zeilberger's algorithm",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/RWN/RWNTZ2AYA7.md",
  "status": null,
  "tag": "RWNTZ2AYA7",
  "uri": "m2://RWNTZ2AYA7",
  "url": "https://tamnd.github.io/math2/wiki/zeilbergers-algorithm-definition/",
  "writing": {
    "tag": "RWNTZ2AYA7",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
