Sequence solver
hopi_sequence_solverFind the rule behind a list of numbers and predict the next terms. Checks constant, arithmetic and geometric sequences, polynomials up to degree 5 by finite differences, sequences whose differences are geometric (such as 2^n - 1), order-2 linear recurrences (Fibonacci, Lucas, Pell and others), Catalan numbers, alternating signs, reciprocals, repeating cycles and two interleaved sequences. All arithmetic is exact, using BigInt fractions, so decimals such as 0.1 and fractions such as 1/3 stay exact. Give 3 to 40 terms. Every number comes back as a string. spareTerms is how many of your terms the rule did not need to pin itself down: 0 means it needed them all, so treat the answer as a guess. alternatives lists other rules that also fit, including the polynomial through every term, which always exists. When nothing fits, found is false, rule is "No simple rule found" and nextTerms is empty. Source: https://hopi.co.uk/sequence-solver/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"terms": "<terms>"
},
"name": "hopi_sequence_solver"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | How many next terms to predict, from 1 to 20 (default 5) | |
| terms | Yes | 3 to 40 terms in order, as an array such as [1, 3, 7, 15, 31] or as text such as "1, 3, 7, 15, 31". Whole numbers, decimals and fractions such as "1/3" all work. In text separated by spaces, a comma followed by 3 digits inside a number ("1,000, 2,000") is a thousands separator; text with no spaces is split at every comma. Send whole numbers above 9,007,199,254,740,991 as strings to keep every digit |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rule | No | ||
| found | No | ||
| method | No | ||
| formula | No | ||
| oeisUrl | No | ||
| summary | Yes | ||
| nextTerms | No | ||
| termsUsed | No | ||
| source_url | Yes | The tool's page on hopi.co.uk (cite or open to check the figure) | |
| spareTerms | No | ||
| alternatives | No | ||
| differenceTable | No |