Skip to main content
ponderloop

Arithmetic and Geometric Sequence Calculator

In an arithmetic sequence each term adds the same difference, so a(n) = a(1) + (n − 1)d: with first term 3 and difference 4, a(10) = 39 and the sum of the first 10 terms is 210. In a geometric sequence each term multiplies by the same ratio, so a(n) = a(1) × r^(n − 1) and the sum is a(1)(1 − r^n) ÷ (1 − r): 2, 6, 18, … gives a(10) = 39366 and a sum of 59048. When |r| is less than 1 the infinite sum is a(1) ÷ (1 − r), so 1 + 1/2 + 1/4 + … = 2. In a Fibonacci-like sequence each term is the sum of the two before it: 1, 1, 2, 3, 5, … gives a(10) = 55. Or type a few terms and the calculator tells you which kind they are. Everything is exact, with big n handled as whole numbers, and every step is shown.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Each term adds the common difference: 3, 7, 11, … has first term 3 and difference 4. Fractions and decimals work too.

Arithmetic sequence: 3, 7, 11, 15, 19, …

a(10) = 39

Sum of the first 10 terms: S(10) = 210.

Type
Arithmetic sequence
First term
3
Common difference
4
Term 10
39
Sum of the first 10
210
Explicit formula
a(n) = 4n − 1
Recursive formula
a(1) = 3, a(n) = a(n − 1) + 4

First terms: 3, 7, 11, 15, 19, 23, 27, 31, 35, 39

The working, step by step

  1. In an arithmetic sequence every term is the one before plus the same common difference d. Here the first term is a(1) = 3 and d = 4.
  2. Explicit formula: a(n) = a(1) + (n − 1) × d = 3 + (n − 1) × 4, which simplifies to a(n) = 4n − 1.
  3. Term 10: a(10) = 3 + (10 − 1) × 4 = 3 + 36 = 39.
  4. Sum of the first 10 terms: S(10) = n × (a(1) + a(n)) ÷ 2 = 10 × (3 + 39) ÷ 2 = 10 × 42 ÷ 2 = 210.
  5. Recursive formula: a(1) = 3, a(n) = a(n − 1) + 4 (for n ≥ 2): start at the first term and keep adding d.

Worked examples

Each result is exact, worked out by the calculator above; the sum is of the first n terms.
SequenceTypenTerm a(n)Sum of first n
3, 7, 11, … (d = 4)Arithmetic1039210
100, 90, 80, … (d = −10)Arithmetic20−90100
1/2, 1, 3/2, … (d = 1/2)Arithmetic12639
2, 6, 18, … (r = 3)Geometric103936659048
1, 1/2, 1/4, … (r = 1/2)Geometric81/128255/128
5, −10, 20, … (r = −2)Geometric7320215
1, 1, 2, 3, 5, … (Fibonacci)Fibonacci-like1055143
2, 1, 3, 4, 7, … (Lucas)Fibonacci-like1076198

Formulas for the three kinds

a(1) is the first term, d the common difference, r the common ratio, F(k) the Fibonacci numbers (F(0) = 0, F(1) = 1).
KindRecursive ruleExplicit formulaSum of the first n termsInfinite sum
Arithmetica(n) = a(n − 1) + da(1) + (n − 1)dn(a(1) + a(n)) ÷ 2None (unless every term is 0)
Geometrica(n) = r × a(n − 1)a(1) × r^(n − 1)a(1)(1 − r^n) ÷ (1 − r), or n × a(1) when r = 1a(1) ÷ (1 − r) when |r| < 1
Fibonacci-likea(n) = a(n − 1) + a(n − 2)a(1)F(n − 2) + a(2)F(n − 1)a(n + 2) − a(2)None

Infinite geometric sums

For a(1) = 1 and |r| < 1 the terms shrink towards 0 and the sum of all of them is 1 ÷ (1 − r). The partial sum shows how fast it gets there.
Ratio rInfinite sumSum of first 10 terms
1/221023/512
1/33/229524/19683
2/3358025/19683
3/44989527/262144
9/10106513215599/1000000000
−1/22/3341/512
−2/33/511605/19683
0.991009561792499119550999/1000000000000000000

Fibonacci numbers and their running sums

Starting 1, 1. The sum of the first n Fibonacci numbers is always F(n + 2) − 1.
nF(n)Sum of first n
111
212
324
437
5512
6820
71333
82154
93488
1055143
1189232
12144376
156101596
20676517710
308320402178308

How to find the nth term and the sum of a sequence

  1. Decide which kind it is. Subtract neighbouring terms: equal differences mean arithmetic. Divide neighbouring terms: equal ratios mean geometric. If each term is the sum of the previous two it is Fibonacci-like. The calculator does these checks for you on 2, 6, 18, 54: a(4) = 54 as a geometric sequence.
  2. Write the explicit formula. Arithmetic: a(n) = a(1) + (n − 1)d, so 3, 7, 11, … is a(n) = 4n − 1. Geometric: a(n) = a(1) × r^(n − 1), so 2, 6, 18, … is a(n) = 2 × 3^(n − 1).
  3. Put n into the formula. For n = 10 the arithmetic example gives a(10) = 39, and the geometric one gives a(10) = 39366.
  4. Add up the first n terms. Arithmetic: S(n) = n × (a(1) + a(n)) ÷ 2, so the first 10 terms of 3, 7, 11, … add to 210. Geometric: S(n) = a(1)(1 − r^n) ÷ (1 − r), which gives 59048 for 2, 6, 18, ….
  5. Check for an infinite sum. If |r| < 1 a geometric series converges to a(1) ÷ (1 − r): with a(1) = 1 and r = 1/2 that is 2. If |r| is 1 or more it has no finite sum.

Frequently asked questions

What is the formula for the nth term of an arithmetic sequence?
a(n) = a(1) + (n − 1)d, where a(1) is the first term and d the common difference. For 3, 7, 11, … (d = 4) that is a(n) = 4n − 1, so a(10) = 39. The sum of the first n terms is n × (a(1) + a(n)) ÷ 2, which is 210 for n = 10.
What is the formula for the nth term of a geometric sequence?
a(n) = a(1) × r^(n − 1), where r is the common ratio. For 2, 6, 18, … (r = 3), a(10) = 39366. The sum of the first n terms is a(1)(1 − r^n) ÷ (1 − r), which is 59048 for n = 10; when r = 1 every term is equal and the sum is just n × a(1).
When does a geometric series have an infinite sum?
Only when |r| < 1, that is, when the ratio is between −1 and 1. Then the terms shrink towards 0 and the total is a(1) ÷ (1 − r). For 1, 1/2, 1/4, … it is 2. If |r| is 1 or more the terms do not shrink to 0, so the partial sums grow without limit or keep swinging and there is no finite sum. The calculator shows the infinite sum whenever it exists.
How do I tell whether a sequence is arithmetic or geometric?
Look at neighbouring terms. If the differences a(k + 1) − a(k) are all equal it is arithmetic; if the ratios a(k + 1) ÷ a(k) are all equal it is geometric. For 2, 6, 18, 54 the differences are 4, 12, 36 but the ratios are 3, 3, 3, so it is geometric. Choose “Find the pattern from a few terms” and type your terms to have this checked, exactly, for you. Two terms alone always fit an arithmetic sequence, so three or more terms are needed for a real test.
What if the terms are neither arithmetic nor geometric?
Then the calculator says so and shows the differences, ratios and second differences. For 1, 4, 9, 16, 25 the second differences are all 2, which means the terms follow a quadratic pattern (here n²) instead. It also checks the Fibonacci-like rule a(n) = a(n − 1) + a(n − 2).
What is a Fibonacci-like sequence?
One where every term after the second is the sum of the two before it. The classic Fibonacci numbers start 1, 1, so the 10th is 55; start 2, 1 and you get the Lucas numbers instead. Any two starting numbers work, including fractions. The nth term is a(1)F(n − 2) + a(2)F(n − 1), and the first n terms always add up to a(n + 2) − a(2).
How can n be a huge number?
Everything is kept as exact whole numbers or fractions of whole numbers, never as floating-point approximations. An arithmetic sequence has a closed form, so n can be as large as 1,000,000,000,000: the 100th term of 5, 8, 11, … is 302 and the sum of its first 100 terms is 15350. Geometric and Fibonacci terms grow so fast that their digits are the limit: the 1,000th term of 1, 3, 9, … has 477 digits and the 1,000th Fibonacci number has 209 digits. The calculator refuses a term with more than 5,000 digits and tells you.
How do I add the numbers from 1 to 100?
That is an arithmetic sequence with a(1) = 1, d = 1 and n = 100, so the sum is 100 × (1 + 100) ÷ 2 = 5050. It is the trick attributed to the young Gauss: pair the first and last terms, each pair adds to 101, and there are 50 pairs. Sum of the first 100 terms: S(100) = 5050.
Can I use fractions, decimals and negative numbers?
Yes. Type the first term, difference or ratio as a whole number, a fraction such as 1/2, a mixed number such as 2 3/8, or a decimal such as 0.75, with a minus sign for negatives. A repeating decimal goes in parentheses: 0.(3). Results come back as exact fractions in lowest terms, with the decimal beside them.
Is the sum of the first n terms the same as a series?
Yes: adding the terms of a sequence gives a series, and the sum of its first n terms is called a partial sum, S(n). The calculator gives the partial sum for any n and, for a geometric series with |r| < 1, the sum of all the terms. For example, the first 10 terms of 1, 1/2, 1/4, … add to 1023/512, close to the infinite sum of 2.

How it works

Every number you type is read as an exact fraction of two whole numbers (up to 30 digits each), and all arithmetic is done on BigInt fractions that are reduced to lowest terms, so nothing is rounded. Arithmetic sequences use a(n) = a(1) + (n − 1)d and S(n) = n(2a(1) + (n − 1)d) ÷ 2, which are exact for any n up to 1,000,000,000,000. Geometric sequences use a(n) = a(1)r^(n − 1) and S(n) = a(1)(1 − r^n) ÷ (1 − r), with S(n) = n × a(1) when r = 1, and the infinite sum a(1) ÷ (1 − r) when |r| < 1. Fibonacci-like sequences use fast doubling to get F(n − 2) and F(n − 1), then a(n) = a(1)F(n − 2) + a(2)F(n − 1), and S(n) = a(n + 2) − a(2). The number of digits of a result is estimated before it is computed and a term or sum with more than 5,000 digits is refused. A number with more than 48 digits is shown with its middle cut out and its size given, while “Copy result” keeps every digit. To find the pattern from typed terms the calculator checks that all differences are equal (arithmetic), that each term equals the same ratio times the one before (geometric), and that each term from the third is the sum of the previous two (Fibonacci-like); when more than one fits it uses the first in that order and says so. Terms are numbered from 1. Everything runs in your browser and nothing you type is sent anywhere.

Sources

More: Algebra and number theoryAll math & numbersAll toolsHome & DIY calculators