All Tools

Number Sequence Generator: Arithmetic, Geometric & More

Generate arithmetic, geometric, even, odd, powers, squares, cubes, look-and-say, Fibonacci-like and linear recurrence sequences, integer pairs and triples, palindromes, zigzags, array literals and set-theoretic ordinals, with the nth-term formula and exact sum. Nothing is uploaded.

Separator
Formula for aₙ
aₙ = a₁ + (n - 1)d = n
Term a₁₀
10
Formula for Sₙ
Sₙ = n(a₁ + aₙ) / 2
Sum S₁₀
55

About the Number Sequence Generator

The Number Sequence Generator lists the terms of a chosen sequence from its parameters. Pick a sequence, set its starting values and how many terms you want, and the list appears at once with Copy and Download .txt buttons and a choice of comma, space or new-line separators. Where a sequence has a closed formula or a meaningful total, the page also shows the nth-term formula, the last term and the exact sum. Whole numbers are computed exactly with arbitrary-precision integers, and decimal or fractional steps are kept as exact fractions, so 0.1 + 0.2 really is 0.3 here. Everything runs in your browser; the numbers you enter never leave your device.

How to use it

Steps

  1. Choose a sequence in the Sequence list. The arithmetic sequence is selected to start.
  2. Fill in its parameters: the first term and common difference, a ratio, seeds, coefficients, ranges or a number of digits, depending on the sequence.
  3. Set the Number of terms, up to 10,000.
  4. Pick a separator, then copy the list or download it as a text file.

The sequences

Progressions

An arithmetic sequence adds the same difference each time, aₙ = a₁ + (n − 1)d. A geometric sequence multiplies by the same ratio, aₙ = a₁ · rⁿ⁻¹; the ratio may be a fraction such as 1/3 or a decimal such as -0.5. Even numbers (OEIS A005843), odd numbers (A005408) and integers in a range with a step, counting up or down and optionally reversed, are special cases.

Powers

Powers of ten (A011557) and powers of two (A000079) run between two exponents. Negative exponents give exact decimals, so 2⁻²⁰ prints as 0.00000095367431640625 in full. Squares (A000290) and cubes (A000578) start from any whole number.

Recurrences

The Fibonacci-like series adds the previous two terms from any pair of seeds, giving the Fibonacci numbers from 0 and 1 and the Lucas numbers from 2 and 1; the tribonacci option adds the previous three. The linear recurrence takes up to ten coefficients, aₙ = c₁aₙ₋₁ + … + cₖaₙ₋ₖ, with one initial value each: coefficients 2, 1 from 0, 1 give the Pell numbers (A000129). Look-and-say numbers describe the previous term digit by digit; from seed 1 they follow OEIS A005150.

Combinations and shapes

Integer pairs and integer triples list every combination drawn from up to three ranges, optionally only ordered (a ≤ b ≤ c), only distinct, or only Pythagorean triples with a² + b² = c². Symmetric integers are the palindromes of OEIS A002113, either in a range or with a given number of digits. A zigzag climbs from a low value to a high value and back down, 1 2 3 2 1 2 3.

Arrays and ordinals

Integer arrays write random or sequential values as a JSON, JavaScript, Python or C array literal ready to paste into code. Von Neumann ordinals build each number as the set of all smaller ones, 2 = {{},{{}}}, and Zermelo ordinals wrap the previous number in braces, 2 = {{{}}}.

Limits

Lists stop at 10,000 terms and 1,000,000 characters, with a message telling you which limit was reached. Fast-growing sequences such as powers or look-and-say numbers reach the character limit first. Ordinals stop at 10, because a von Neumann ordinal roughly doubles in length at every step. Inputs may have up to 1,000 digits, and the ranges for pairs and triples hold up to 1,000 values each.

Privacy

The terms are calculated by code on this page. Nothing is sent to a server, and nothing is stored after you close the tab. Random array values come from your browser's cryptographic random number generator.

Related tools

For the Fibonacci and Lucas numbers with an nth-term lookup, use the Fibonacci Generator. The Prime Number Generator lists primes, the Random Number Generator draws random values, and the List Sorter sorts or shuffles a generated list.

Open-source credits

The sequences are implemented in-house in TypeScript with the built-in BigInt type and exact fractions; no third-party library is used. The results are tested against the On-Line Encyclopedia of Integer Sequences: A005843, A005408, A011557, A000079, A000290, A000578, A005150 and A005341 for look-and-say, A000045, A000032, A000073, A000129, A002113 and A009003 for the hypotenuses of Pythagorean triples.

Frequently asked questions

Why does 0.1 plus 0.2 come out as exactly 0.3 here?

Decimals and fractions are stored as exact fractions of whole numbers rather than as floating-point values. A term is printed as a decimal only when its decimal expansion ends, and as a fraction such as 1/3 when it repeats, so no rounding error ever builds up along the sequence.

What is the look-and-say sequence?

Each term describes the previous one aloud: 1 is one 1, written 11; that is two 1s, written 21; then one 2 and one 1, written 1211. From seed 1 it is OEIS A005150, and its terms grow by about 30 percent each step, Conway's constant.

How do I enter a linear recurrence such as the Pell numbers?

Type the coefficients c₁ to cₖ separated by commas, then exactly as many initial values. For the Pell numbers enter coefficients 2, 1 and initial values 0, 1, which gives 0, 1, 2, 5, 12, 29, 70. Up to ten coefficients are accepted, and zero or negative coefficients are allowed.

What is the difference between von Neumann and Zermelo ordinals?

Both build the natural numbers from the empty set. Von Neumann defines each number as the set of all smaller numbers, so 2 is {0, 1} = {{},{{}}} and the sets roughly double in length. Zermelo defines each number as the set holding only its predecessor, so 2 is {{{}}}. Both stop at 10 on this page.

Why does a long list stop with a message about the limit?

Lists are capped at 10,000 terms and 1,000,000 characters so the page stays responsive. Fast-growing sequences such as powers of ten, geometric sequences with a large ratio or look-and-say numbers usually reach the character limit long before the term limit. Ask for fewer terms or a smaller range to continue.

Which languages can the integer array be written in?

The array can be written as a JSON list, a JavaScript const declaration, a Python list assignment or a C array initialiser. In C the type is int while every value fits in 32 bits and long long once a value is larger, so the literal compiles as it is.

Other related tools