Tools Guides
math Free No signup

Number Sequence Generator

Generate classic number sequences, identify an unknown sequence, or define a custom one.

Loading tool…

About this tool

Choose from eleven built-in generators — Fibonacci, Lucas, Primes, Perfect squares, Triangular, Pentagonal, Factorial, Powers of 2, Powers of N, Arithmetic progression, and Geometric progression — and instantly view the first 20 terms alongside the closed-form formula and OEIS reference number. Identify mode lets you paste any sequence of numbers and the tool detects which known sequence it matches. Custom mode lets you specify a first term and common difference or ratio to generate the next N terms of your own sequence.

How to use

  1. 1 Select a sequence from the dropdown (e.g. Fibonacci) and the first 20 terms, formula, and OEIS reference appear instantly.
  2. 2 Switch to 'Identify' tab, paste a comma-separated list of numbers, and click 'Identify' to see which built-in sequence it matches.
  3. 3 Switch to 'Custom' tab, enter your start value, step, and term count, then click 'Generate'.
  4. 4 Copy any sequence to your clipboard with the 'Copy' button beside the output.

What a number sequence generator does

A number sequence is an ordered list of numbers built by a rule. This tool does three related jobs: it generates the terms of well-known sequences, it tries to identify an unknown sequence you paste in, and it builds custom arithmetic or geometric progressions from your own starting values. Each built-in sequence comes with its defining formula and, where one exists, its reference number in the On-Line Encyclopedia of Integer Sequences (OEIS), so you can verify the math against an authoritative catalogue rather than taking the output on faith.

The sequences it knows, and their rules

The generator ships with eleven named patterns. The recursive and closed-form rules behind them are:

SequenceRuleFirst terms
FibonacciF(n) = F(n-1) + F(n-2), F(0)=0, F(1)=10, 1, 1, 2, 3, 5, 8
Lucassame recurrence, L(0)=2, L(1)=12, 1, 3, 4, 7, 11, 18
Primesn-th number divisible only by 1 and itself2, 3, 5, 7, 11, 13
Squaresa(n) = n²1, 4, 9, 16, 25
TriangularT(n) = n(n+1)/21, 3, 6, 10, 15
PentagonalP(n) = n(3n-1)/21, 5, 12, 22, 35
Factoriala(n) = n!1, 1, 2, 6, 24, 120
Powers of 2 / Na(n) = Nⁿ from n=01, 2, 4, 8, 16 (N=2)

The arithmetic option uses a(n) = a₀ + n·d and the geometric option uses a(n) = a₀ · rⁿ, where you choose the start, the common difference d, or the common ratio r.

A worked example

Pick Triangular Numbers and the tool generates the first 20 terms. Term 5 is T(5) = 5 × 6 / 2 = 15; term 6 is 6 × 7 / 2 = 21. Notice each term is the previous one plus its own index: 15 + 6 = 21. That is the visual meaning of "triangular" — stacking rows of 1, 2, 3, 4… dots. Switch to the geometric tab with start 1 and ratio 2 and you get the powers of two; change the ratio to 3 and the same machinery produces 1, 3, 9, 27, 81. One formula, many sequences.

Identifying a mystery sequence

Paste at least three comma-separated numbers into the Identify tab and the tool checks them against every built-in pattern, reporting each match with its formula and OEIS code. Give it 2, 1, 3, 4, 7 and it recognises the Lucas numbers; give it 1, 3, 6, 10 and it returns Triangular. For arithmetic and geometric guesses it infers the step or ratio from your first two numbers, so 5, 8, 11, 14 is identified as an arithmetic progression with difference 3. If nothing matches within a small tolerance, it says so honestly rather than inventing a rule — a useful signal that your sequence may be irregular, mistyped, or simply outside the built-in set.

Use cases

  • Homework and self-study. Check whether your hand-computed terms are right, and see the closed-form formula next to the recurrence.
  • Test data and puzzles. Generate a clean list of squares, primes, or factorials to seed unit tests, spreadsheets, or programming exercises, then copy it with one click.
  • Spotting a pattern. When you have a few numbers from a problem and suspect there's a rule, the Identify tab is faster than guessing.
  • Teaching. Demonstrate how Fibonacci and Lucas share a recurrence but differ only in their seeds, or how triangular numbers are partial sums of the integers.

Tips and common mistakes

  • Three numbers is the minimum to identify. Two numbers fit infinitely many rules; the tool requires at least three and ignores anything that isn't a valid number.
  • Factorials and powers grow explosively. By the twentieth term a factorial is astronomically large, and beyond a certain point standard floating-point arithmetic loses exactness. Treat very large terms as approximate.
  • The Identify tab only knows its built-in list. "No match" means none of these eleven patterns fit — not that your sequence is meaningless. For an exhaustive search, look the terms up directly in the OEIS.
  • Geometric ratios can be fractional. A ratio of 0.5 produces a halving sequence; the field accepts decimals, so you are not limited to whole-number growth.

Everything is computed in your browser as you type — no input is sent anywhere — so you can generate and identify sequences offline.

Frequently Asked Questions

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}