Number Sequence Calculator
20th term: 97
- Sequence type
- Arithmetic
- First term
- 2
- Common difference
- 5
- Number of terms
- 20
- 20th term
- 97
- Sum of terms
- 990
- First terms
- 2, 7, 12, 17, 22, 27, 32, 37, 42, 47, …
What this calculator does
A number sequence is an ordered list of numbers that follow a rule. This calculator works with two of the most common families: arithmetic sequences, where each term changes by a fixed amount, and geometric sequences, where each term is multiplied by a fixed factor.
For either family, you provide the first term, the step size, and the number of terms. The calculator returns the nth term, the sum of all terms through that position, and a preview of the first ten values. It also identifies the common difference or common ratio so you can check the pattern.
How to use this calculator
- Choose Arithmetic or Geometric.
- Enter the first term of the sequence.
- Enter the common difference for an arithmetic sequence, or the common ratio for a geometric sequence.
- Enter the number of terms n, using a whole number from 1 to 1,000.
- Click Calculate.
The headline shows the nth term. The summary rows show the sum, the step size, the term count, and the beginning of the sequence.
Formulas
Arithmetic sequence:
a_n = a_1 + (n − 1) × d
S_n = n × (a_1 + a_n) / 2
Geometric sequence:
a_n = a_1 × r^(n − 1)
S_n = a_1 × (1 − r^n) / (1 − r), r ≠ 1
S_n = n × a_1, r = 1
In these formulas, a_1 is the first term, d is the common difference, r is the common ratio, n is the term position, and S_n is the sum of the first n terms. The geometric sum formula changes at r = 1 because the standard expression has a zero denominator there.
Default example
The default arithmetic sequence starts at 2 with a common difference of 5. Its first terms are 2, 7, 12, 17, 22, and so on. At n = 20, the nth term is 2 + 19 × 5 = 97. The sum of the first 20 terms is 20 × (2 + 97) / 2 = 990.
For a geometric example, start at 2 with a common ratio of 5 and n = 12. The 12th term is 2 × 5^11 = 97,656,250. The sum of the first 12 terms is 2 × (5^12 − 1) / (5 − 1) = 122,070,312. The terms grow much faster than in the arithmetic case because each step multiplies rather than adds.
Assumptions and limitations
- The sequence must be exactly arithmetic or exactly geometric. A list that changes by varying amounts does not fit either model.
- n must be a positive whole number. The calculator caps it at 1,000 terms to keep the preview and computation manageable.
- The geometric common ratio must not be zero. A ratio of one is allowed and produces a constant sequence.
- Negative differences and negative ratios are supported. A negative ratio makes the terms alternate in sign.
- Results are computed with double-precision floating-point arithmetic. Very large terms or sums may overflow and are rejected, and long decimals may lose precision in the last digits.
- This page covers arithmetic and geometric sequences only. Fibonacci sequences and other recurrence relations are not included.
Frequently asked questions
What is the difference between an arithmetic and a geometric sequence?
An arithmetic sequence adds the same number at every step, so the gap between consecutive terms is constant. A geometric sequence multiplies by the same number at every step, so the ratio between consecutive terms is constant. Arithmetic growth is linear; geometric growth is exponential.
What happens when the common ratio is 1?
Every term equals the first term, so the sequence never changes. The usual geometric sum formula divides by 1 − r, which becomes zero, so the calculator uses the special case S_n = n × a_1 instead.
Can a sequence have a negative common difference or ratio?
Yes. A negative difference makes an arithmetic sequence decrease. A negative ratio makes a geometric sequence alternate between positive and negative values while its magnitude may still grow. The formulas remain valid for both cases.
Source
Reference: Calculator.net — Number Sequence Calculator.
Math Calculators
- Scientific Calculator
- Fraction Calculator
- Percentage Calculator
- Percent Error Calculator
- Random Number Generator
- Exponent Calculator
- Binary Calculator
- Hex Calculator
- Half-Life Calculator
- Quadratic Formula Calculator
- Log Calculator
- Ratio Calculator
- Root Calculator
- Least Common Multiple Calculator
- Greatest Common Factor Calculator
- Factor Calculator
- Rounding Calculator
- Matrix Calculator
- More Math Calculators