Number Sequence Generator
Generate arithmetic, geometric, Fibonacci, prime, square, and custom range sequences in one click. Compute the sum, copy as a comma list, JSON array, or CSV, and get exact big-integer results with BigInt. Free, private, and runs entirely in your browser.
Configure Your Sequence
Your Sequence
What does this Number Sequence Generator do?
A number sequence generator produces a list of numbers that follow a rule. The three classic rules are arithmetic (add a constant step: 1, 4, 7, 10), geometric (multiply by a constant ratio: 2, 4, 8, 16), and Fibonacci (each term is the sum of the previous two: 1, 1, 2, 3, 5, 8). This tool also generates prime numbers, square numbers, and custom ranges with a step, which covers almost every sequence you would need for test data, worksheets, or exploration.
Once generated, you get the sequence as a comma list, a space list, a newline list, a JSON array, or a true CSV row. The tool also computes the count, the first and last terms, and the sum, so you can sanity-check a long sequence without scrolling through it.
Everything runs locally in your browser. Nothing is uploaded, and no account is needed.
How to generate a number sequence
- Pick a sequence type: Arithmetic, Geometric, Fibonacci, Primes, Squares, or Range.
- Set the parameters: Enter a start value and a step or ratio. For Fibonacci, primes, and squares, you only need the number of terms.
- Choose an output format: Comma, space, newline, JSON array, or CSV row.
- Click Generate Sequence: The result appears instantly, along with the count, first term, last term, and sum.
- Copy or download: Copy the formatted sequence, or download it as a CSV file with an index column.
Why use this Number Sequence Generator?
Six sequence types
Arithmetic, geometric, Fibonacci, primes, squares, and custom ranges. One tool covers test data, math worksheets, and exploration.
Exact big integers
Integer sequences use BigInt, so large Fibonacci terms and large ID ranges stay exact instead of silently losing precision above 2^53.
Sum and nth term
The tool computes the count, first term, last term, and sum automatically, so you can verify a long sequence at a glance.
JSON and CSV output
Copy a JSON array for your code, or download a CSV with an index column that opens cleanly in Excel or Google Sheets.
Fast prime sieve
Prime mode uses a Sieve of Eratosthenes, so tens of thousands of primes generate in well under a second.
Works offline
Once the page loads, generation runs entirely on your device. No internet connection is needed after the initial page load.
Sequence types at a glance
Each type follows a different rule. The table below shows the formula and a short example so you can pick the right one quickly.
| Type | Rule | Example | Best for |
|---|---|---|---|
| Arithmetic | aₙ = start + (n − 1) × step | 1, 4, 7, 10, 13 | IDs, odd/even lists, evenly spaced samples |
| Geometric | aₙ = start × ratio(n − 1) | 2, 4, 8, 16, 32 | Doubling, growth curves, powers |
| Fibonacci | aₙ = aₙ₋₁ + aₙ₋₂ | 1, 1, 2, 3, 5, 8, 13 | Math exploration, nature examples |
| Primes | Integers greater than 1 with no divisors other than 1 and themselves | 2, 3, 5, 7, 11, 13 | Hashing demos, number theory, worksheets |
| Squares | aₙ = n² | 1, 4, 9, 16, 25 | Area, patterns, visual math |
| Range | start, start + step, … up to end | 1, 3, 5, 7, 9 (start 1, end 10, step 2) | Custom lists, pagination seeds, filtered ranges |
Who uses a number sequence generator?
Developers and testers
- Generate 1,000 sequential IDs starting from 5000 for database fixtures.
- Create pagination URLs (
?page=1,?page=2, …) for crawl seeds or sitemap testing. - Produce JSON arrays of test values for a mock API.
Teachers and students
- Build arithmetic or geometric worksheets with a specific start and step.
- Show the first 50 Fibonacci numbers or the first 100 primes as a visual aid.
- Check sums and patterns without typing everything by hand.
Analysts and researchers
- Generate evenly spaced sample indices for a dataset.
- Build a custom range with a step to match a sampling interval.
- Export a CSV of sequence values for a spreadsheet model.
Everyday use
- Number a list of items or raffle tickets.
- Generate odd or even numbers for a game or puzzle.
- Create a quick list of squares or powers for reference.
How the generator keeps results exact
JavaScript numbers are doubles, and integers above 2^53 lose precision silently. That matters for Fibonacci (the 79th term is already above 2^53) and for large ID ranges. This tool detects when every input is an integer and switches the sequence engine to BigInt, so the terms are exact strings instead of rounded doubles.
For decimal inputs, the tool uses floating-point arithmetic but formats each term to 10 decimal places and strips trailing zeros, which avoids the classic 0.1 + 0.2 = 0.30000000000000004 display problem.
Prime mode uses a Sieve of Eratosthenes with an estimated upper bound, then extends the sieve if the estimate falls short. That keeps it fast for both small and large prime counts.