Vous êtes sur la page 1sur 18

# Finding the Next Number in a Sequence: The Method of Common Differences (page 1 of 7)

## Sections: Common differences, Recursions, General examples, Non-math "sequences"

When faced with a sequence for which you need to find missing values or the next few values, you need first to look at it and see if you can get a "feel" for what is going on. For instance: Find the next number in the following sequence: I notice that

1, 4, 9, 16, 25,....

12 = 1, 22 = 4, 32 = 9, 42 = 16, and 52 = 25. So it looks as though the pattern here is squaring. That is, for the first term (the 1-st term), it looks like they squared 1; for the second term (the 2-nd term), they squared 2; for the third term (the 3-rd term), they squared 3; and so on. For the n-th term ("the enn-eth term"), they will probably want me to square n. In particular, for the sixth term, they will probably want me to square 6.
The next number in the sequence is

62 = 36.

Why is the answer only "probably" the square of six? Because "the right answer" is nothing more than whatever answer the author had in mind when he designed the exercise; you might "see" a completely different pattern that he hadn't intended. But as long as your answer is something that you can mathematically (or at least logically) justify, your answer should be acceptable, even if it isn't "right". Find the next number in the following sequence:

1, 4, 27, 256,....

11 = 1, 22 = 4, 33 = 27, and 44 = 256. The pattern seems to be that the n-th term is of the form nn.
This pattern looks similar to the previous sequence, but with Then the next term, being the fifth term

## Find the next number in the following sequence:

I have to be more clever to figure out the pattern on this sequence. Each term is square. That is, the pattern is given by:

n 1 2 3 4 5

n2 1 4 9 16 25

n2 + 1 2 5 10 17 26

## n2 + 1. Then the sixth term is:

62 + 1 = 36 + 1 = 37
Note that these two sequences were generated by the polynomials

## n2 and n2 + 1. But what if the

sequence is generated by a more complicated polynomial? How would you figure it out then? There is a method, and I'll demonstrate it by re-doing the second sequence above, where we already know what the pattern is. Copyright Elizabeth Stapel 2002-2011 All Rights Reserved Find the next number in the following sequence: formula for the n-th term.

## 2, 5, 10, 17, 26,...., and provide a

To find the pattern, I will list the numbers, and find the differences for each pair of numbers. That is, I will subtract the numbers in pairs (the first from the second, the second from the third, and so on), like this:

Since these values, the "first differences", are not all the same value, I'll continue subtracting:

Since these values, the "second differences", are all the same value, then I can stop. It isn't important what the second difference is (in this case, "2"); what is important is that the second differences are the same, because this tells me that the polynomial for this sequence of values is a quadratic. (Once you've studied calculus, you'll be able to understand why this is so. For now, just trust me that this works.) Since the formula for the terms is a quadratic, then I know that it is of the form:

an2 + bn + c
...for some numbers a, b, and c. Now I have to find those numbers. How? By plugging in some of the values from the sequence, and then solving the resulting system of equations. For instance, I

know that the first term (that is, the term when value:

## n = 1) is 2, so I'll plug in 1 for n and 2 for the

a(1)2 + b(1) + c = a + b + c = 2
The second term (that is, the term when

n = 2) is 5, so:

a(2)2 + b(2) + c = 4a + 2b + c = 5
The third term (that is, the term when

n = 3) is 10, so:

a(3)2 + b(3) + c = 9a + 3b + c = 10
This gives me a system of three equations in three unknowns, which I can solve. You can use whatever method you like, including using matrices in your graphing calculator:

(Remember that calculators suffer from round-off error. When you get a result like "1.3E13", which represents

"0.00000000000013", you should be aware that, in this context, this means "zero".) a = 1, b = 0, and c = 1, so the formula is: 1n2 + 0n + 1 = n2 + 1

Then

...just as I had determined before, and the sixth term is: next term: 6 + 1 = 36 + 1 = 37 2 formula for the n-th term: n + 1 You can simplify your computations somewhat by using a formula for the leading coefficient of the sequence's polynomial. The coefficient of the first term of the polynomial will be equal to the common difference divided by the factorial of the polynomial's degree. In the example above, the common difference was 2 and the degree was 2, so the leading coefficient was 2 2! = 2 2 = 1. I'm not aware of any formulas for the other coefficients. Find the next number in the following sequence:
2

## 0, 12, 10, 0, 12, 20,....

I could try to cast about for a formula for this sequence, but I think I'll go right to finding differences:

Since the third differences are all the same (in this case, "6"), the generating polynomial for this sequence is a cubic, or third degree, polynomial, so it is of the form:

an3 + bn2 + cn + d
I'll evaluate this at some of the values of n:

a(1)3 + b(1)2 + c(1) + d = a + b + c + d = 0 a(2)3 + b(2)2 + c(2) + d = 8a + 4b + 2c + d = 12 a(3)3 + b(3)2 + c(3) + d = 27a + 9b + 3c + d = 10 a(4)3 + b(4)2 + c(4) + d = 64a + 16b + 4c + d = 0
This gives me four equations in four unknowns. I'll use matrices again to solve:

Then

a = 1, b = 13, c = 44, and d = 32, so the formula is: 1n3 + (13)n2 + 44n + (32) = n3 13n2 + 44n 32

They gave me the first six terms of the sequence, so I need to give the seventh term, which is:

## (7)3 13(7)2 + 44(7) 32 = 343 637 + 308 32 = 18

Find the next term in the following sequence:

2, 4, 8, 16, 32,....

You might notice right away that every term is gotten by multiplying the previous term by 2. That is, the formula in this case is not a polynomial, but an exponential: an = 2 In math-speak, the n-th term an("aysub-enn") is 2 to the power n. But what if you didn't happen to notice this? What would happen if you tried to find the differences?
n

## I will try to find the common difference:

As you can see, I am not arriving at a common difference. However, do you see something interesting in the diagonal rows? In each top-left-to-bottom-right diagonal, the values are the same! For sequences where the rule is "multiply by some fixed amount", the diagonals are always multiplied by one less than this fixed amount. Since the rule for this sequence is "multiply by 2", the entries on the diagonals are multiplied by 1, which is why they are unchanged going down the diagonals. In either case, I came up with the rule "multiply the last term by next term here is:

## 2 to get the next term", so the

2(32) = 64
Find the next term in the following sequence:

1, 3, 9, 27, 81,....

In this case I am almost multiplying by 3, but "multiply by 3" doesn't account for the minus sign. Notice, though, that the minus sign alternates; only every other term is negative. This means that we are multiplying by a negative three, so the next term is:

3(81) = 243
By the way, the differences in this case look like this:

Going down each diagonal (highlighted in color, above), you can find the multiplier for each row by taking the lower number and dividing by the higher number. For instance, 12 3 = 4 and 144 36 = 4. Since the multiplier for the table of differences is one less than the multiplier for the sequence, then the sequence multiplier is one more than the table multiplier, or 4 + 1 = 3, which we already knew. Find the next term in the following sequence:

5, 7, 9, 11, 13,...

These numbers aren't growing really quickly, so this doesn't appear to be a "multiply by some fixed value" kind of sequence. Supposing I didn't notice right away that the rule is "add two to the previous value", I can still find the answer from the table of differences:

Since the first differences are the same, this means that the rule is a linear polynomial, something of the form y = an + b. I will plug in the first couple of values from the sequence, and solve for the coefficients of the polynomial:

5 = 1a + b 7 = 2a + b
This system solves as:

## So the formula is sixth term:

y = 2n + 3. Since they gave me the first five terms, the next term will be the

2(6) + 3 = 12 + 3 = 15
Find the next term in the following sequence:

## 1, 4, 8, 13, 19, 26,...

This doesn't appear to be a "multiply by a fixed value" kind of sequence, and there doesn't appear to be a fixed value that is added each time, either. (For instance, in the last sequence, we always added 2 to get the next term.) Let's see what the differences give me:

Since the second differences are the same, the formula for this sequence is a 2 quadratic, y = an + bn + c. I'll plug in the first three terms for y and solve for the values of a, b, and c:

1a + 1b + c = 1 4a + 2b + c = 4 9a + 3b + c = 8

Then the formula for this sequence is ( /2 terms, the next term will be the seventh:

## ( 1/2 )(7)2 + ( 3/2 )(7) 1 = 49/2 + 21/2 1 = 34

Return to the Lessons Index | Do the Lessons in Order | Get "Purplemath on CD" for offline use | Print-friendly page

## Finding the Next Number in a Sequence: Recursive Sequences (page 3 of 7)

Sections: Common differences, Recursions, General examples, Non-math "sequences"

Take another look at the last sequence in the previous section: Find the next term in the following sequence:

## ( 1/2 )(7)2 + ( 3/2 )(7) 1 = 49/2 + 21/2 1 = 34

The formula we found for the terms was a bit messy, what with the fractions. But the row of first differences points out a simpler rule. Each next term was gotten by adding a growing amount to the previous term. To get the second term, they added 3 to the first term; to get the third term, they added 4 to the second term; to get the fourth term, they added 5 to the third term; and so on. The rule, in mathematical vocabulary, was "To get the n-th term, add n+1 to the (n1)-th term." In table form, it looks like this:

n 1 2 3

an 1 4 8

change

an+1 4 8 13

+3 +4 +5

4 5 6

13 19 26

+6 +7 +8

19 26 34

This sort of sequence, where you get the next term by doing something to the previous term, is called a "recursive" sequence. In the last case above, we were able to come up with a regular formula (a "closed form expression") for the sequence; this is often not possible (or at least not reasonable) for recursive sequences, which is why you need to keep them in mind as a difference class of sequences. Probably the most famous recursive sequence is the Fibonacci sequence (pronounced "fibb - uh - NAH - chee" sequence). It is defined like this:

## a1 = 1 a2 = 1 an = an1 + an2 for n > 2

That is, the first two terms are each defined to have the value of 1. (These are called "seed" values.) Then the third term is the sum of the previous two terms, so a3 = 1 + 1 = 2. Then the fourth term is the sum of the second and the third, so a4 = 1 + 2 = 3. And so forth. The first few terms are:

## 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377,...

While recursive sequences are easy to understand, they are difficult to deal with, in that, in order to get, say, the thirty-nineth term in this sequence, you would first have to find terms one through thirty-eight. There isn't a formula into which you could plug n = 39 and get the answer. (Well, there is, but its development is likely far beyond anything you've yet been trained to do.) For instance, if you try to find the differences, you'll get this:

As you can see, you're not going to get a row of differences where all the entries are the same. However, you should notice that the sequence repeats itself in the lower rows, but shifted over to the right. And, in the beginning of each lower row, you should notice that a new sequence is starting: first 0; then 1, 0; then 1, 1, 0; then 2, 1, 1, 0; and so on. This is characteristic of "add the previous terms" recursive sequences. If you see this kind of behavior in the rows of differences, you should try finding a recursive

formula.

Recursive sequences can be hard to figure out, so generally they'll give you fairly simple ones of the "add a growing amount to get the next term" or "add the last two or three terms together" type: Find the next number in the sequence:

3, 2, 5, 7, 12, ...

The first two values appear to be seed values, and then I'm adding the last two terms to get the next term:

n 1 2 3 4 5

an2

an1

an 3

## 3 3 2 5 2 5 7 3+2 2+5 5+7

2 5 7 12

If I'm right about the rule, then the next term would be:

7 + 12 = 19
By the way, the differences look like this:

Note how the sequence terms are repeated in lower rows, but shifted to the right, and how the new sequence terms are entering from the left. Find the next term in the sequence:

## 1, 2, 2, 4, 8, 11, 33, 37, 148, ...

This one is harder (and is not, strictly speaking, recursive). Take a look at the differences:

As you can see, we're getting nothing useful from this table of differences. The rule here is not consistent:

n 1 2 3 4 5 6 7 8 9

an1

rule

an 1

1 2 2 4 8 11 33 37

+1 1 +2 2 +3 3 +4 4

2 2 4 8 11 33 37 148

## Then the next term will be "add five":

148 + 5 = 153
As the above example shows, even the table of differences might not help with a recursive sequence. But don't be discouraged if it takes a while to find a formula or a pattern. If the sequence is mathematical, then it should be possible, eventually, to find some sort of an answer. The next section demonstrates some solutions.
Return to the Lessons Index | Do the Lessons in Order | Get "Purplemath on CD" for offline use | Print-friendly page

## General Examples (page 4 of 7)

Sections: Common differences, Recursions, General examples, Non-math "sequences"

What follows are just some additional examples, given so you can see the process at work. Find the missing number in the sequence:

3, 4, 6, 9, ___, 18.
4 4

First, I'll see if anything happens to pop out at me. To multiply from 3 to 4, I'd have to multiply by /3, but (4)( /3) does not equal 6, so that must not be the rule. To add from 3 to 4, I'd have to add 1, but 4 + 1 is not 6; 4 + 2 = 6. Wait....

## 3+1=4 4+2=6 6+3=9

Hmm... What if the rule is "add the next bigger number to the last term"? Then I'd have:

9 + 4 = 13
Does this fit? Do I get "18" for the next value?

13 + 5 = 18
Yup; it worked! So it would appear that the rule is "add the next bigger number to the previous term", and:

13.

## Note that I could have gone straight to the differences:

Since the second differences are the same, then the formula is a quadratic. Plugging in the first three data points, I get:

a+b+c=3 4a + 2b + c = 4 9a + 3b + c = 6
Solving this system of equations, I get:

an = 0.5n2 0.5n + 3
Plugging in

## a5 = 0.5(25) 0.5(5) + 3 = 12.5 2.5 + 3 = 10 + 3 = 13

So my previous answer was right, or has at least been confirmed as logical. Find the formula for the To add from

## n-th term in the sequence: 4, 12, 20, 28, 36,...

4 to 12, I'd have to use 8. To add from 12 to 20, I'd also have to use 8. Let's check to see if "add 8" is the rule:

4 + 8 = 12 12 + 8 = 20 20 + 8 = 28 28 + 8 = 36
It appears that the rule is "add 8". So what is the rule for the n-th term? Let's look at the terms:

n = 1: 4 n = 2: 4 + 8 n = 3: 4 + 8 + 8 = 4 + 28 n = 4: 4 + 8 + 8 + 8 = 4 + 38 n = 5: 4 + 8 + 8 + 8 + 8 = 4 + 48
Following this pattern, the rule for the n-th term will be:

an = 4 + (n 1)8

## 1, 3/2, ___, 7/8, 9/16

Sometimes, when dealing with fractions, they've really given you two sequences in one. In this case, looking at the numerators and denominators separately:

1, 3, ___, 7, 9 1, 2, ___, 8, 16
The numerators appear to be counting by twos; the denominators appear to be doubling. The missing term is
5

## Find the next two terms in the sequence:

This sequence is actually related to the previous one. If I take the sequence terms apart, listing alternate terms in their own sequences, I get:

## 5, 8, 11, 14, 17,... 2, 3, 4, 5, 6,...

In other words, the odd-numbered terms (the first, third, fifth, etc) appear to be of the form "add 3to the previous term", and the even-numbered terms (the second, fourth, sixth, etc) appear to be of the form "add 1 to the previous term". Then the next two terms are 17 + 3 = 20 and 6 + 1 = 7. The next two terms, in order, are 20 and 7. Find the next term in the sequence:

## 1, 2, 3, 5, 7, 11, 13, 17, ___

If you try common differences on this sequence, you'll see that it doesn't work, so this does not appear to be a polynomial sequence. Whenever a sequence is not obviously generated by a polynomial, it is generally (though not always) generated by a recursion. That is, I should look for some pattern that relates the later terms in this sequence to the earlier ones. At first, I thought the rule for this was going to be "add the preceding terms together", because:

1+2=3 2+3=5 3 + 5 = 8, not 7, so that doesn't work. And multiplication clearly doesn't work, since 23 = 6, not 5. However, notice
But that:

6 + 5 = 11 6 + 7 = 13 6 + 11 = 17
I would guess that the formula is meant to be:

a1 = 1 a2 = 2 a3 = 3 a4 = 5 a5 = 7 an = 6 + a(n2)

There is no guarantee that this is the "right" answer, since the "right" answer is the one that your teacher wants. However, this formula does "work", so it should be acceptable to say that the next term is: The next (nineth) term is

6 + a7 = 6 + 13 = 19.

Note, however, that the sequence might be simpler even than that. Start listing the first few primes, and see what kind of sequence you get. Compare this result with the values of the above listing. Find the missing term:

## 2, 8, 27, 85, 260, ____, 2365

I checked, and this didn't appear to be a polynomial sequence. It didn't appear at first to be a recursive sequence, but recursives can be messy and hard to figure out. But if one is particularly patient and clever, and plays around with this a bit, one might come up with:

## a1 = 2 a2 = 23 + 2 = 8 a3 = 83 + 3 = 27 a4 = 273 + 4 = 85 a5 = 853 + 5 = 260

The pattern appears to be "take the last term, multiply by three, and then add the number for the sequence term you're on". Continuing, we get:

## a6 = 2603 + 6 = 786 a7 = 7863 + 7 = 2365

So the pattern gives us the seventh term we were supposed to get, which confirms that the sixth term should probably be 786. Find the next number: 2,

3, 4, 6, 6, 9, 8, ___

For this one, I noticed that 4 is twice 2, and 6 is twice 3. Then 6 (the second one) is thrice 2and 9 is thrice 3. Continuing, 8 is four times 2, so the next number should be four times 3, or12. You can also view this as equivalent fractions: 2/3, 4/6, 6/9, 8/12, etc. Either way, the next number is 12. By the way, "fiddling around" is very often the best method for finding solutions. Don't be afraid to grab some scratch paper and just try stuff. There's nothing "wrong" with you if an answer isn't immediately obvious to you. Just keep trying. There are quite a few sequences handed out to students in math classes that are not even mathematical sequences. Since this bugs me, I'll try to start a collection here of "spoilers", so you can short-circuit the process of frustration and find your answer here. For instance: Find the next number in the sequence:

## 31, 28, 31, 30, ...

31 days. February has 28 days. March has 31 days. April has 30 days. Copyright
January has

Find the next character in the sequence: J, F, M, A, ... "January" starts with "J". "February" starts with "F". "March" starts with "M". "April" starts with "A".

Find the next character in the sequence: S, M, T, W, ... "Sunday" starts with "S". "Monday" starts with "M". "Tuesday" starts with "T". "Wednesday" starts with "W".

## Find the next character in the sequence: Z, O, T, T, F, F, S, S,...

"zero" starts with "Z" "one" starts with "O" "two" starts with "T"

Find the next character in the sequence: A, E, F, H, ... "A" is written with all straight lines. "B" is written with curvy and straight lines. "C" is written with curvy lines. "D" is written with curvy and straight lines. "E" is written with all straight lines. "F" is written with all straight lines. "G" is written with curvy and straight lines. "H" is written with all straight lines.

Find the next character in the sequence: C, J, O, ... This has nothing to do with math, and works by the same reasoning as the preceding example; it just takes the all-curvy-line letters, instead of the all-straight-line letters..

## Find the next number in the sequence:

3, 3, 5, 4, 4, ...

"1" is spelled as "one", which has three letters. "2" is spelled as "two", which has three letters. "3" is spelled as "three", which has five letters. "4" is spelled as "four", which has four letters. "5" is spelled as "five", which has four letters. Another of this sort is 3, 4, 4, 7, 10 (or 11), etc, which represents the numbers of letters (or characters in the squares of 1, 2, 3, 4, 5, etc; namely, 1, 4, 9, 16, 25, etc. (The difference will come from whether or not hyphens are included.) Find the next two numbers in the sequence:

8, 5, 4, 9, 1,...

This one will be more obvious if I spell things out: "8" is spelled as "eight", which starts with an "e". "5" is spelled as "five", which starts with an "f" and an "i". "4" is spelled as "four", which starts with an "f" and an "o". "9" is spelled as "nine", which starts with an "n". "1" is spelled as "one", which starts with an "o". Golly, they're spelling the digit names and then listing the names alphabetically. So, hmm, "seven" and "six" would come next. Find the next number in the sequence:

7, 8, 5, 5, 3, 4, ...

"January" is spelled with seven letters. "February" is spelled with eight letters. "March" is spelled with five letters. "April" is spelled with five letters. "May" is spelled with three letters. "June" is spelled with four letters.

## Find the next number in the sequence:

6, 6, 7, 9, ...

"Sunday" is spelled with six letters. "Monday" is spelled with six letters. "Tuesday" is spelled with seven letters. "Wednesday" is spelled with nine letters. Find the next term in the sequence: F21, S23, T25, T27, S29, M31. F21: Friday the 21st. S23: Sunday the 23rd. T25: Tuesday the 25th. T27: Thursday the 27th. S29: Saturday the 29th. M31: Monday the 31st. Skipping every other day, the next term must be "Wednesday the 2nd", or "W2" (or maybe "W02"). (If you're not sure about this, then pull out a calendar and find a month where Friday falls on the twentyfirst. See where this leads you.) Find the missing term in the seqence:

## 325, 446, 567, ___, 709, 820.

Consider the digits for the units, tens, and hundreds places separately: hundreds digits: 3, tens digits: 2, ones digits: 5,

4, 5, ___, 7, 8

4, 6, ___, 0, 2 6, 7, ___, 9, 0

They're adding by one in the hundreds and ones digits, and adding by twos in the tens digit. The missing term is

## 127863: 6 + 3 = 9 12789: 8 + 9 = 17 _______ 135: 3 + 5 = 8

Do you see? They're taking the last two digits, adding them, replacing the last two digits with one zero, and then adding the sum they just found. Completing the pattern:

## 1287: 8 + 7 = 15: 120 + 15 = 135 135: 3 + 5 = 8: 10 + 8 = 18

The missing number is

1287.

Given that 1 and 2 yield 9, 3 and 4 yield 20, and 5 and 6 yield 12, find the number after17 and 12.