guess_recurrence
Guess a P-recursive (holonomic) recurrence from integer sequence terms or an OEIS A-number, then predict additional terms and indicate fit strength and integrality.
Instructions
Guess a P-recursive (holonomic) recurrence sum_{i=0..r} p_i(n) a(n-i) = 0 with deg p_i <= d, and predict further terms from it.
Give either terms (comma-separated, with the offset = n of the first term) or an anum (its terms; ext=True
uses DATA + b-file terms). (r, d) are tried in order of the number of unknowns (r+1)(d+1); the first whose
kernel is one-dimensional (mod a 61-bit prime, then exactly over Z) with at least spare more equations than
unknowns is returned. Constant coefficients are d = 0. A guess, not a proof; spare_equations says how much
the data over-determines it, and integral whether all predicted terms came out integers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ext | No | ||
| anum | No | ||
| spare | No | ||
| terms | No | ||
| offset | No | ||
| max_order | No | ||
| n_predict | No | ||
| max_degree | No |