acalculator

What is my sequence's nth term?

Pick arithmetic or geometric, then type the first term, the common difference or ratio, and n. You get the nth term, the sum, and the formulas.

Your numbers

Sequence
nth term (aₙ)
29

Term 10 is 29, and the sum of terms 1 to 10 is 155.

Sum of the first n terms (Sₙ)
155
First terms
2, 5, 8, 11, 14, 17, 20, 23, 26, 29
Explicit formula
a_n = 2 + 3(n - 1)
Recursive formula
a_1 = 2, a_n = a_(n - 1) + 3

nth term (aₙ): 29. Term 10 is 29, and the sum of terms 1 to 10 is 155.

How to calculate

Finds the nth term and the sum of the first n terms of an arithmetic or geometric sequence, lists the first terms, and writes its explicit and recursive formulas.

Example with the default inputs (Sequence Arithmetic, First term (a₁) 2, Common difference (d) 3, Term number (n) 10): Term 10 is 29, and the sum of terms 1 to 10 is 155.

Method: Arithmetic: aₙ = a₁ + (n − 1)d and Sₙ = n(a₁ + aₙ)/2. Geometric: aₙ = a₁ × r^(n − 1) and Sₙ = a₁(1 − rⁿ)/(1 − r) (n × a₁ when r = 1); for −1 < r < 1 the sum to infinity is a₁/(1 − r).

  • Terms are numbered from 1; the first term is a₁.
  • The numbers are read as the exact decimals typed and the formulas are worked out in exact fractions; each result is then the nearest 64-bit float.
  • A term or sum beyond about 1.8 × 10^308 has no answer.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Sequence Arithmetic, First term (a₁) 2, Common difference (d) 3, Term number (n) 10 gives nth term (aₙ) 29, Sum of the first n terms (Sₙ) 155, First terms 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, Explicit formula a_n = 2 + 3(n - 1), Recursive formula a_1 = 2, a_n = a_(n - 1) + 3.Source: Formulas from OpenStax College Algebra 2e, section 9.2: https://openstax.org/books/college-algebra-2e/pages/9-2-arithmetic-sequences
  2. Sequence Geometric, First term (a₁) 3, Common ratio (r) 2, Term number (n) 8 gives nth term (aₙ) 384, Sum of the first n terms (Sₙ) 765, First terms 3, 6, 12, 24, 48, 96, 192, 384, Explicit formula a_n = 3 × 2^(n - 1).
  3. Sequence Geometric, First term (a₁) 1, Common ratio (r) 0.5, Term number (n) 5 gives nth term (aₙ) 0.0625, Sum of the first n terms (Sₙ) 1.9375, Sum to infinity 2, First terms 1, 0.5, 0.25, 0.125, 0.0625.
  4. Sequence Arithmetic, First term (a₁) 0.1, Common difference (d) 0.2, Term number (n) 3 gives nth term (aₙ) 0.5, Sum of the first n terms (Sₙ) 0.9, First terms 0.1, 0.3, 0.5.
  5. Sequence Geometric, First term (a₁) 5, Common ratio (r) -3, Term number (n) 4 gives nth term (aₙ) -135, Sum of the first n terms (Sₙ) -100, Recursive formula a_1 = 5, a_n = (-3) × a_(n - 1).
  6. Sequence Arithmetic, First term (a₁) 10, Common difference (d) -4, Term number (n) 6 gives nth term (aₙ) -10, Sum of the first n terms (Sₙ) 0, Explicit formula a_n = 10 - 4(n - 1).

How it works

Terms are numbered from 1. For an arithmetic sequence with first term a₁ and common difference d:

  • nth term: aₙ = a₁ + (n − 1)d
  • sum of the first n terms: Sₙ = n(a₁ + aₙ)/2

For a geometric sequence with first term a₁ and common ratio r:

  • nth term: aₙ = a₁ × r^(n − 1) (with r^0 = 1, also when r is 0)
  • sum of the first n terms: Sₙ = a₁(1 − rⁿ)/(1 − r) when r is not 1, and Sₙ = n × a₁ when r = 1
  • sum to infinity, only when −1 < r < 1: S∞ = a₁/(1 − r)

The numbers are read as the exact decimals typed (0.1 is exactly one tenth), the formulas are worked out in exact fractions, and each result is then shown as the nearest 64-bit floating-point number, to at most 6 decimal places. A term or a sum beyond the largest 64-bit float (about 1.8 × 10^308) has no answer. The first term and the difference are from −10^9 to 10^9, the ratio from −1,000 to 1,000, and n from 1 to 10,000.

The calculator shows:

  • nth term (aₙ), Sum of the first n terms (Sₙ), and, for a geometric sequence with −1 < r < 1, Sum to infinity.
  • First terms: a₁, a₂, … up to 10 terms (or n terms when n is less than 10), each written as a decimal in full (no exponent, no thousands separators, a plain hyphen for a minus sign) when it needs at most 20 decimal places and at most 30 digits, and otherwise as the shortest text of its nearest 64-bit float in JavaScript's number notation (1e+25, 5e-324), joined by a comma and a space, and followed by a comma, a space and … when n is more than 10.
  • Explicit formula, with a₁, d and r written the same way as the terms:
    • arithmetic: a_n = a₁ + d(n - 1), with - |d| for a negative d, + (n - 1) for d = 1, - (n - 1) for d = −1, and just a_n = a₁ for d = 0;
    • geometric: a_n = a₁ × r^(n - 1), with a negative r in brackets ((-3)^(n - 1)) and a₁ × left out when a₁ is 1.
  • Recursive formula: a_1 = a₁, a_n = a_(n - 1) + d (or - |d|) for arithmetic, and a_1 = a₁, a_n = r × a_(n - 1) (a negative r in brackets) for geometric.

Worked examples by hand

Arithmetic, a₁ = 2, d = 3, n = 10. The terms are 2, 5, 8, 11, 14, 17, 20, 23, 26, 29. a₁₀ = 2 + 9 × 3 = 29, and S₁₀ = 10 × (2 + 29)/2 = 155.

Geometric, a₁ = 3, r = 2, n = 8. The terms are 3, 6, 12, 24, 48, 96, 192, 384. a₈ = 3 × 2⁷ = 384, and S₈ = 3 × (1 − 2⁸)/(1 − 2) = 3 × 255 = 765.

Geometric, a₁ = 1, r = 0.5, n = 5. The terms are 1, 0.5, 0.25, 0.125, 0.0625, so a₅ = 0.0625 and S₅ = 1 × (1 − 0.03125)/0.5 = 1.9375. Because −1 < 0.5 < 1, the sum to infinity is 1/(1 − 0.5) = 2.

Arithmetic, a₁ = 0.1, d = 0.2, n = 3. 0.1, 0.3, 0.5, and 0.1 + 0.3 + 0.5 = 0.9 exactly.

Geometric, a₁ = 5, r = −3, n = 4. 5, −15, 45, −135, and S₄ = 5 × (1 − 81)/(1 + 3) = −100.

Arithmetic, a₁ = 10, d = −4, n = 6. 10, 6, 2, −2, −6, −10, which add up to 0.

Other questions people ask

What is an arithmetic sequence?

A list of numbers where the same amount, the common difference d, is added each time: 2, 5, 8, 11, … has d = 3. Its nth term is aₙ = a₁ + (n − 1)d.

What is a geometric sequence?

A list of numbers where each term is the one before times the same number, the common ratio r: 3, 6, 12, 24, … has r = 2. Its nth term is aₙ = a₁ × r^(n − 1).

How do I find the sum of an arithmetic sequence?

Multiply the number of terms by the average of the first and last terms: Sₙ = n(a₁ + aₙ)/2. For 2, 5, …, 29 (10 terms): 10 × (2 + 29)/2 = 155.

How do I find the sum of a geometric sequence?

Use Sₙ = a₁(1 − rⁿ)/(1 − r) when r is not 1. For 3, 6, …, 384 (8 terms, r = 2): 3 × (1 − 256)/(1 − 2) = 765. When r = 1, every term is a₁, so Sₙ = n × a₁.

When does a geometric series have a sum to infinity?

When the ratio is between −1 and 1. The terms then shrink toward 0, and the sums approach a₁/(1 − r). For 1, 0.5, 0.25, … that is 1/(1 − 0.5) = 2.

What is the difference between an explicit and a recursive formula?

An explicit formula gives any term directly from n, such as aₙ = 2 + 3(n − 1). A recursive formula gives the first term and a rule for the next term from the one before, such as a₁ = 2, aₙ = aₙ₋₁ + 3.

How do I tell if a sequence is arithmetic or geometric?

Subtract each term from the next: if the differences are all equal, it is arithmetic. Divide each term by the one before: if the ratios are all equal, it is geometric. 1, 4, 9, 16 is neither.