🔧Toolify

Number Sequence Generator — Arithmetic, Geometric, Fibonacci & More

Generate number sequences instantly: arithmetic progressions, geometric series, Fibonacci, square numbers, prime numbers, and triangular numbers. Configure the starting terms and length, then copy the result.

Sequence
1, 3, 5, 7, 9, 11, 13, 15, 17, 19
135791113151719

Sum

100

nth term formula

a(n) = 1 + (n−1)×2

How it works

Types of number sequences and their formulas

An arithmetic sequence adds a constant difference d to each term: a, a+d, a+2d, .... The nth term is a + (n-1)d. The sum of the first n terms is n(2a + (n-1)d)/2. Example: 3, 7, 11, 15, 19... (first term 3, common difference 4). Arithmetic sequences model constant-rate growth like savings with regular deposits or distance covered at constant speed.

A geometric sequence multiplies each term by a constant ratio r: a, ar, ar², ar³, .... The nth term is ar^(n-1). The sum of the first n terms is a(1-r^n)/(1-r) when r ≠ 1. Example: 2, 6, 18, 54... (first term 2, ratio 3). Geometric sequences model exponential growth — compound interest, population growth, radioactive decay.

Fibonacci, triangular, and special sequences

The Fibonacci sequence starts with two terms (usually 1, 1) and each subsequent term is the sum of the previous two: 1, 1, 2, 3, 5, 8, 13, 21, 34.... The ratio of consecutive terms converges to the golden ratio φ ≈ 1.618. Fibonacci numbers appear in plant growth patterns, shell spirals, and financial technical analysis.

Square numbers are perfect squares: 1, 4, 9, 16, 25.... The nth term is n². Triangular numbers count objects arranged in equilateral triangles: 1, 3, 6, 10, 15.... The nth triangular number is n(n+1)/2. These connect to combinations (the nth triangular number is C(n+1, 2)) and are used in summing arithmetic series. Prime numbers — integers greater than 1 with no factors other than 1 and themselves — have no closed-form formula and grow according to the prime number theorem.

Applications of number sequences

Arithmetic sequences underlie linear interpolation, grade distributions, and salary scales. Geometric sequences are the foundation of compound interest calculations, audio decibel scales, and musical frequency ratios (each octave doubles the frequency — a geometric sequence with ratio 2). The Fibonacci sequence appears in sorting algorithms (Fibonacci search), heap data structures, and the analysis of divide-and-conquer algorithms.

Square and triangular numbers appear in combinatorics and are used to compute sums of sequences. The formula 1 + 2 + 3 + ... + n = n(n+1)/2 is the nth triangular number, famously attributed to Gauss who computed it as a child. Prime sequences have profound implications for cryptography and number theory — the distribution of primes is described by the Riemann Hypothesis, one of the Millennium Prize Problems.

Frequently asked questions

What is the difference between an arithmetic and a geometric sequence?

An arithmetic sequence has a constant difference between consecutive terms (e.g., 2, 5, 8, 11 — difference of 3). A geometric sequence has a constant ratio between consecutive terms (e.g., 2, 6, 18, 54 — ratio of 3). Arithmetic sequences grow linearly; geometric sequences grow exponentially.

What is the formula for the nth term of a Fibonacci sequence?

The closed-form formula (Binet's formula) is F(n) = (φⁿ - ψⁿ) / √5, where φ = (1+√5)/2 ≈ 1.618 (golden ratio) and ψ = (1-√5)/2 ≈ -0.618. In practice, Fibonacci is easier to compute iteratively by summing the two previous terms, which is what this calculator does.

Are there infinitely many prime numbers?

Yes. Euclid proved this around 300 BC using a proof by contradiction: assume finitely many primes p1, p2, ..., pn. Then p1×p2×...×pn + 1 is either prime or divisible by a prime not in the list — a contradiction. This proof has been reproduced in countless forms and the result is considered one of the most elegant in mathematics.

What is the sum of the first n natural numbers?

The sum 1 + 2 + 3 + ... + n = n(n+1)/2. This is the nth triangular number. For example, 1+2+3+4+5 = 15, and 5×6/2 = 15. The formula was famously rediscovered by Gauss as a schoolchild, who noticed that pairing terms from each end of 1-100 gives 50 pairs of 101, totaling 5,050.

What happens if the common ratio of a geometric sequence is negative?

The sequence alternates in sign: e.g., with a=2 and r=-3, the sequence is 2, -6, 18, -54, 162.... This is still a valid geometric sequence. The terms grow in absolute value if |r| > 1 and decay if |r| < 1. If r = -1, the sequence alternates between +a and -a.

What are triangular numbers used for?

Triangular numbers count objects that can be arranged as equilateral triangles: 1 dot, 3 dots (triangle of side 2), 6 dots (side 3), 10 dots (side 4). They appear in combinations: the nth triangular number T(n) = C(n+1, 2) — the number of ways to pick 2 items from n+1. They also equal the sum of the first n natural numbers and appear in Pascal's triangle (the third diagonal).

Can this generator produce sequences with decimal terms?

Yes. For arithmetic and geometric sequences, the first term and common difference or ratio can be decimal numbers. For example, an arithmetic sequence starting at 0.5 with difference 0.25 gives 0.5, 0.75, 1.0, 1.25.... The sum is computed to full floating-point precision.

What is the largest prime this tool can generate?

The generator finds the first N prime numbers using trial division. For N up to 50 terms, the 50th prime is 229, well within computational range. This method is fast for small primes but would be slow for very large primes. For generating large primes, probabilistic tests like Miller-Rabin are used.

Related tools

Last updated:

Try our AI prompts →