Number sequence generator
Generate arithmetic, geometric, Fibonacci, Lucas, triangular, square, cube, Catalan, Bell and prime sequences, and detect the rule behind a series of numbers with the difference method.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Generate a sequence
Every sequence is generated locally from its published formula, using double precision; values that outgrow the safe integer range are reported instead of printing distorted digits.
Sequence
1, 4, 7, 10, 13, 16, 19, 22, 25, 28
10128145Detect a sequence
Separate with commas or spaces, at least 2 terms; the order is arithmetic → geometric → Fibonacci/Lucas → special sequences → polynomial by differences
Polynomial sequence (difference method)1, 3, 5, 72 · Constant difference 2n^2 + 10 | 1, 2, 5, 10, 17 1 | 1, 3, 5, 7 2 | 2, 2, 2 3 | 0, 0 4 | 0
What this tool does
- Generate a sequence for a worksheet or lesson: arithmetic, geometric, Fibonacci, triangular, square and prime sequences are one dropdown away.
- Check a recurrence you wrote down: paste the first few terms into the detector and it tells you whether the rule is arithmetic, geometric or a named sequence.
- Practise the difference method: polynomial sequences report the order of the constant difference and the recovered polynomial, so you can compare it with your own difference table.
- Get combinatorial sequences without a lookup table — Catalan and Bell numbers print prefixes such as 1, 1, 2, 5, 14, 42… on demand.
Example
Input
Arithmetic, first term 2, common difference 3, 5 terms
Output
2, 5, 8, 11, 14; 5 terms, first term 2, last term 14, sum 40
Leaving the Fibonacci first term at 0 gives 0, 1, 1, 2…, while 1 gives 1, 1, 2, 3… — both common conventions are supported.
Frequently asked questions
In what order does the detector try rules?
First constant first differences (arithmetic), then a constant ratio (geometric), then the Fibonacci and Lucas recurrences, then triangular, square, cube, Catalan, Bell and prime prefixes, and finally the difference method for polynomials. If nothing fits it says so explicitly instead of guessing.
How does the difference method recover a polynomial?
It keeps differencing until some order is constant; that order is the degree. Newton’s forward difference formula then turns the leading values of each difference row into polynomial coefficients, so 1, 2, 5, 10, 17 gives n² + 1 with n starting at 0.
How many terms can I generate?
Up to 200. Fibonacci, Catalan and Bell numbers grow quickly though, so once a term exceeds the safe integer range (2^53 − 1) the tool reports “the sequence grows too fast” rather than printing distorted digits — use fewer terms in that case.
Is the prime sequence built with a sieve?
It uses trial division: 2 is special-cased and then only odd divisors up to √n are tested. That is fast enough for individual numbers and avoids keeping a large boolean array around, so the first 200 primes are instant.
Is anything uploaded?
No. Everything runs in the browser, the page makes no requests, and the sequence lives in memory only — a refresh clears it.
Keywords:number sequencesequence generator数列生成等差数列等比数列fibonacci斐波那契catalan卡特兰数bell number贝尔数prime sequence质数数列difference method差分法