Method of finite differences

This is a method for finding the nth term of a sequence. First make a table showing the differences, then the differences of the differences, etc, until you reach a row which is all zeros. (If you can't find a row which is all zeros, the method will not work.) For example:

13113169131223351...
2820386292128...
61218243036...
66666...
0000...

Call the terms in the sequence a0, a1, a2 etc, the first differences b0, b1, b2 etc, the second differences c0, c1, c2 and so on:

a0a1a2a3a4a5a6a7...
b0b1b2b3b4b5b6...
c0c1c2c3c4c5...
d0d1d2d3d4...
e0e1e2e3...

The formula for the nth term of the sequence is: $${a}_{{n}}={a}_{{0}}+{b}_{{0}}{n}+{c}_{{0}}\frac{{{n}{\left({n}-{1}\right)}}}{{{2}!}}+{d}_{{0}}\frac{{{n}{\left({n}-{1}\right)}{\left({n}-{2}\right)}}}{{{3}!}}+{e}_{{0}}\frac{{{n}{\left({n}-{1}\right)}{\left({n}-{2}\right)}{\left({n}-{3}\right)}}}{{{4}!}}+\ldots$$

(Of course the formula stops when it gets to the row which is all zeros)

So applying this to the example above, we get: $${a}_{{n}}=1+2{n}+\frac{{6{n}{\left({n}-{1}\right)}}}{{{2}!}}+\frac{{6{n}{\left({n}-{1}\right)}{\left({n}-{2}\right)}}}{{{3}!}}$$

$${a}_{{n}}=1+2{n}+{3{n}{\left({n}-{1}\right)}}+{{n}{\left({n}-{1}\right)}{\left({n}-{2}\right)}}$$ $${a}_{{n}}={1}+{2}{n}+{3}{{n}}^{{2}}-{3}{n}+{n}{\left({{n}}^{{2}}-{3}{n}+{2}\right)}$$ $${a}_{{n}}={1}+{2}{n}+{3}{{n}}^{{2}}-{3}{n}+{{n}}^{{3}}-{3}{{n}}^{{2}}+{2}{n}$$ $${a}_{{n}}={1}+{n}+{{n}}^{{3}}$$ If you check this against sequences in the two boxes above, you will see that it works. However, it does rely on calling the term that starts the sequence the "zeroth term. If we need a formula in which the first term is a1, we just need to replace n by (n-1) everywhere it appears in the formula. So the nth term of the sequence above would be: $${a}_{{n}}={1}+{(n-1)}+{{(n-1)}}^{{3}}$$ $${a}_{{n}}={n}+{{(n-1)}}^{{3}}$$

[Of course we could go right back to the original formula and make this change, giving: $${a}_{{n}}={a}_{{1}}+{b}_{{1}}{(n-1)}+{c}_{{1}}\frac{{{(n-1)}{\left({n}-{2}\right)}}}{{{2}!}}+{d}_{{1}}\frac{{{(n-1)}{\left({n}-{2}\right)}{\left({n}-{3}\right)}}}{{{3}!}}+{e}_{{1}}\frac{{{(n-1)}{\left({n}-{2}\right)}{\left({n}-{3}\right)}{\left({n}-{4}\right)}}}{{{4}!}}+\ldots$$ But that tends to make the simplification harder.]

Here is an easier example, illustrating a different approach in which we extend the table backwards to create a "zeroth term.

1st2nd3rd4th5th6th...
2510172637...
357911...
2222...
000...

We extend this backwards, starting with the bottom row and working up:

0th1st2nd3rd4th5th6th...
12510172637...
1357911...
22222...
0000...

Now the formula for the nth term is: $${a}_{{n}}=1+1{n}+\frac{{2{n}{\left({n}-{1}\right)}}}{{{2}!}}$$

$${a}_{{n}}=1+{n}+{{n}{\left({n}-{1}\right)}}$$ $${a}_{{n}}={1}+{n}+{{n}}^{{2}}-{n}$$ $${a}_{{n}}={1}+{{n}}^{{2}}$$