The three kinds of sequence and their formulas
A sequence is a list of numbers built by a rule. Three rules cover most of what turns up in school maths, finance and puzzles. In each formula below, a is the first term, n is the position of the term you want (1 for the first term, 2 for the second and so on), an is the term in that position and Sn is the sum of terms 1 to n.
Arithmetic: add the same amount each time
an = a + (n − 1) × d Sn = n ÷ 2 × (2a + (n − 1) × d)
Here d is the common difference, the fixed amount added at each step. It is negative for a sequence that goes down. The sum formula is the same as “the number of terms times the average of the first and last term”.
Geometric: multiply by the same amount each time
an = a × rn − 1 Sn = a × (1 − rn) ÷ (1 − r) S∞ = a ÷ (1 − r) when −1 < r < 1
Here r is the common ratio, the fixed multiplier. When r is 1 every term equals a, so the sum is simply n × a. S∞ is the value the running total approaches when the terms shrink towards zero; it exists only when r is strictly between −1 and 1.
Fibonacci-type: add the two previous terms
an = an − 1 + an − 2 Sn = an + 2 − a2
You choose the first two terms and the rule produces the rest. Starting with 1 and 1 gives the classic Fibonacci numbers; starting with 2 and 1 gives the Lucas numbers. The sum shortcut says that the total of the first n terms is the term two places further on, less the second term.
Worked examples by hand
- Arithmetic: 2, 5, 8, 11, … Find the 10th term and the sum of the first 10. The difference is d = 3. a10 = 2 + (10 − 1) × 3 = 2 + 27 = 29. S10 = 10 ÷ 2 × (2 + 29) = 5 × 31 = 155.
- Geometric: 3, 6, 12, 24, … Find the 8th term and the sum of the first 8. The ratio is r = 2. a8 = 3 × 27 = 3 × 128 = 384. S8 = 3 × (1 − 28) ÷ (1 − 2) = 3 × 255 = 765.
- Infinite geometric sum: 8 + 4 + 2 + 1 + … Here a = 8 and r = 0.5, so S∞ = 8 ÷ (1 − 0.5) = 16. The running total gets as close to 16 as you like but never passes it.
- Fibonacci: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. The 10th term is 55. The 12th term is 144, so the sum of the first 10 is 144 − 1 = 143.
How the calculator identifies a pasted list
It runs the same tests you would by hand, in this order:
- Differences. Subtract each term from the one after it. If every difference is the same, the sequence is arithmetic.
- Ratios. Divide each term by the one before it. If every ratio is the same, it is geometric. For 4, 12, 36, 108 the ratios are all 3, so the next terms are 324, 972 and 2,916.
- Sum of the previous two. If every term from the third onwards equals the two before it added together, it is Fibonacci-type.
- Second differences. If the differences are not constant but the differences between them are, the sequence is quadratic, with a rule of the form an² + bn + c. For 1, 4, 9, 16 the differences are 3, 5, 7 and the second differences are both 2, which gives the rule n² and a next term of 25.
If none of the tests passes, the calculator says so instead of guessing.
Things that catch people out
The exponent is n − 1, not n
The first term has had the rule applied zero times, so the 10th term has had it applied nine times. Using n in place of n − 1 gives the term one place too far along. It is the most common error with both the arithmetic and geometric formulas.
A short list never proves a rule
The terms 1, 2, 4 fit “double each time” (next term 8) and also “add one more each time” (next term 7). Any finite list can be continued in more than one way. The calculator reports the simplest standard rule that fits everything you entered, so give it as many terms as you have.
Geometric growth outruns intuition
In the old story of the chessboard, one grain of rice is placed on the first square and the amount doubles on each of the 64 squares. The last square alone holds 263 grains, and the total is 264 − 1, about 1.8 × 1019. By contrast, adding the whole numbers from 1 to 100, an arithmetic sum, comes to only 5,050. Compound interest is a geometric sequence, which is why it behaves so differently from simple interest over long periods.
Infinite sums need a shrinking ratio
The formula a ÷ (1 − r) gives a number for any r except 1, but it only means something when the terms shrink. With r = 2 it would return a negative “sum” for a series that plainly grows without limit. The calculator shows a dash for the infinite sum unless r is between −1 and 1.
Very large terms are rounded
Results of 1015 or more are shown in scientific notation, rounded to six significant figures. Behind the display they are held to about 16 significant figures, so the last digits of a huge term are not exact.