The nth term of a number sequence is a formula that gives you the number at position n in that sequence. There are two different formulae for calculating the nth term, and which one you use depends on the sequence.

The common difference formula

Imagine the sequence: 2, 4, 6, 8, 10, ... - We want to work out the nth term for this sequence. The formula used here is

dn + ( a - d )

Where -
d = Common difference between all terms.
a = First term.

An example of its use on this sequence -

dn + ( a - d )
2n + ( 2 - 2 )

nth term = 2n

Proof, by finding the third term -

2n
2 * 3

= 6

Changing difference formula

This is a bit more complicated, and is applied to sequences where the difference between each number is not a constant, as in the sequence: 3, 5, 9, 15, 24, ... The trick here is to find the difference increase - so, the difference between 3 and 5 is 2, the difference between 5 and 9 is 4, the difference between 9 and 15 is 6... see the pattern emerging? The difference increase is 2. So, we use the formula -

a + (n-1)d + 0.5(n-1)(n-2)C

Where -
d = the first difference (2 in the sequence above).
C = The difference increase.
a = the first term.

So, an example of its use, using the sequence above -

a + (n-1)d + 0.5(n-1)(n-2)C
3 + (n-1)2 + 0.5(n-1)(n-2)2
3 + 2n - 2 + n2 - 2n - n + 2

> 3 + n2 - n

Proof, by finding the 4th term:

3 + n2 - n
3 + 16 - 4

= 15.

This idea can be generalized.

Noung's writeup will allow you to solve any number sequence puzzle where the numbers are on a straight line (a first-order polynomial) or a parabola (a second-order polynomial), respectively.

Using Lagrange interpolation, any number sequence puzzle can be solved by fitting a polynomial of degree n-1 through the n numbers given. You can even prove your solution correct!

However, a polynomial may not always be the best fit - for instance, for the number sequence `1, 2, 1, 2, 1` the 'obvious' next number is `2`, but the underlying function that alternates between 1 and 2 is not a polynomial, and Lagrange interpolation will produce a different result. This can be solved by using an even more general method of interpolation that allows arbitrary functions to be fit onto the given points. But it seems more appropriate to discuss this under the more descriptive title "How to solve any number sequence puzzle".

Log in or register to write something here or to contact authors.