SEQUENCE CALCULATOR

Sequence calculator

Enter the first term and the step, get any term and the sum.

How do I find the nth term of an arithmetic sequence?

aₙ = a₁ + (n − 1)d. For 3, 7, 11, … (d = 4), the 10th term is 3 + 9 × 4 = 39.

How do I add up an arithmetic sequence?

Sₙ = n ÷ 2 × (2a₁ + (n − 1)d): the first 10 terms of 3, 7, 11, … add up to 5 × (6 + 36) = 210.

How do I find the nth term of a geometric sequence?

aₙ = a₁ × rⁿ⁻¹. For 2, 6, 18, … (r = 3), the 5th term is 2 × 3⁴ = 162.

How do I add up a geometric sequence?

Sₙ = a₁(1 − rⁿ) ÷ (1 − r): the first 5 terms of 2, 6, 18, … sum to 242.

Can an infinite geometric series have a sum?

Yes, when |r| < 1: S = a₁ ÷ (1 − r). 1 + ½ + ¼ + … adds up to exactly 2.

What is the sum of the numbers from 1 to 100?

5,050. With a₁ = 1, d = 1 and n = 100 the formula gives 100 ÷ 2 × (2 + 99) = 5,050. The trick is to pair the first and last terms: each pair adds to 101, and there are 50 pairs.

What happens when the ratio of a geometric sequence is negative?

The terms alternate in sign. With a₁ = 2 and r = −3 the sequence is 2, −6, 18, −54, 162, −486, and the sixth term is −486.

Finding how many terms there are

Sometimes the last term is known and the count is not. Solving aₙ = a₁ + (n − 1)d for n gives n = (aₙ − a₁) ÷ d + 1. For 3, 7, 11, … ending at 99, n = (99 − 3) ÷ 4 + 1 = 25, and the tool confirms the 25th term is 99. For a geometric sequence take logarithms: n = ln(aₙ ÷ a₁) ÷ ln r + 1. For 3, 6, 12, … ending at 1,536, n = ln(512) ÷ ln 2 + 1 = 10, and the 10th term is 1,536. If n does not come out as a whole number, the value is not a term of that sequence.

Telling which kind of sequence you have

Subtract neighbors and divide neighbors. If the differences are all equal, the sequence is arithmetic; if the ratios are all equal, it is geometric; if neither is constant it is some other kind. The squares 1, 4, 9, 16, 25 have differences 3, 5, 7, 9, which are not equal, and ratios 4, 2.25, 1.78, … that are not equal either, so neither formula applies (the differences of the differences are constant, which marks a quadratic pattern). A sequence of constant terms such as 5, 5, 5 is both arithmetic with d = 0 and geometric with r = 1.

Infinite series with a negative ratio

A negative ratio with |r| < 1 still converges; the terms just alternate in sign and the partial sums swing above and below the limit. For 2, −1, ½, −¼, … the ratio is −½ and the sum is 2 ÷ (1 − (−½)) = 1.3333. The condition is on the size of r, not its sign, which is why r = −1.5 diverges even though it is negative.

Two kinds of sequences

In an arithmetic sequence each term differs from the previous one by a constant d, so growth is linear: aₙ = a₁ + (n − 1)d. In a geometric sequence each term is the previous one multiplied by a constant r, so growth is exponential: aₙ = a₁rⁿ⁻¹. The sum of the first n terms is Sₙ = n ÷ 2 × (a₁ + aₙ) for the arithmetic case and Sₙ = a₁(1 − rⁿ) ÷ (1 − r) for the geometric case, with Sₙ = n a₁ when r = 1. If |r| < 1 the infinite geometric series has a sum, a₁ ÷ (1 − r), and otherwise it diverges.

Worked examples

Arithmetic: for 5, 8, 11, … (a₁ = 5, d = 3) the 20th term is 5 + 19 × 3 = 62 and the sum of the first 20 terms is 10 × (5 + 62) = 670. Geometric: for 3, 6, 12, … (a₁ = 3, r = 2) the 10th term is 3 × 2⁹ = 1,536 and the first 10 terms add up to 3,069. A series that converges: 1, ½, ¼, … has 10 terms summing to 1.998047, and the infinite sum is 2.

Common mistakes

Off-by-one errors with the index are the most frequent: the nth term uses n − 1 steps, not n. Another is mistaking the type of sequence, since 2, 4, 8, 16 is geometric (ratio 2) and not arithmetic. Third, applying the infinite-sum formula when |r| is 1 or more, where the terms do not shrink and the sum does not exist. And a negative common difference or ratio is valid: 20, 17, 14, … has d = −3.

Sources: OpenStax College Algebra 2e, sections 9.2 (Arithmetic Sequences), 9.3 (Geometric Sequences) and 9.4 (Series and Their Notations). Related: summation calculator, Fibonacci calculator, compound interest calculator and exponential growth calculator.