{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "RWNTZ2AYA7"
    },
    {
      "field": "defines",
      "target": "WTXMRG6WR4"
    }
  ],
  "body": "\n## Summary\n\nGosper's algorithm decides, for a hypergeometric term $t_k$, whether its partial sums $\\sum_{j \u003c k} t_j$ are a hypergeometric term plus a constant.\nWhen they are, it finds that term.\nThis is the discrete analogue of deciding whether an integral can be done in closed form.\nIt reduces the question to finding a polynomial solution of a linear recurrence with polynomial coefficients.\nIt is a building block of [[Zeilberger's algorithm|VA7MH05Z3B]] and of the search for [[WZ pairs|WC0QNABPZ4]].\n\n## Explanations\n\n### L1 human\n\nSome sums have a neat closed form, such as $\\sum_{j=0}^{k-1} j\\cdot j! = k! - 1$.\nOthers, such as the partial sums $1 + \\frac12 + \\cdots + \\frac1k$ of the harmonic series, have none of the same kind.\nGosper's algorithm looks for an answer $T_k$ that is the term $t_k$ times a rational function of $k$, with $T_{k+1} - T_k = t_k$.\nIt either finds such a $T_k$ or proves that none exists.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "33F10",
      "68W30",
      "39A10"
    ],
    "name": "Gosper's algorithm",
    "same_as": {
      "wikidata": "Q5587427",
      "wikipedia": "Gosper's algorithm"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Gosper%27s_algorithm"
      }
    ],
    "tag": "NHMJQBS04M"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/NHMJQBS04M/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/NHMJQBS04M.md",
  "msc": [
    "33F10",
    "68W30",
    "39A10"
  ],
  "name": "Gosper's algorithm",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/NHM/NHMJQBS04M.md",
  "status": null,
  "tag": "NHMJQBS04M",
  "uri": "m2://NHMJQBS04M",
  "url": "https://tamnd.github.io/math2/wiki/gospers-algorithm/",
  "writing": {
    "tag": "NHMJQBS04M",
    "kind": "concept",
    "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
      }
    ]
  }
}
