Question 1060844
<pre><b><font size = 4>
First we use a difference table to find out what degree of
polynomial general solution assume:

We list the terms in a column, subtract each number from the
number just beneath it, and write the difference out beside
the number.  Then we do the same thing with the new column.
W continue making new columns until we come to a column which
only contains only one number, or the same number over and over.

 5  7  6  6  
12 13 12  6
25 25 18
50 43
93 

Since it took 3 columns past the one with the original sequence
to find one with only one number, 6, we know that the general
formula must have degree 3, and we'll need the first 3+1 or 4 
terms of the sequence

So we assume

{{{a[n]}}}{{{""=""}}}{{{An^3+Bn^2+Cn+D}}}

We substitute n=1,2,3,4

{{{a[1]}}}{{{""=""}}}{{{A(1)^3+B(1)^2+C(1)+D}}}{{{""=""}}}{{{5}}}
{{{a[2]}}}{{{""=""}}}{{{A(2)^3+B(2)^2+C(2)+D}}}{{{""=""}}}{{{12}}}
{{{a[3]}}}{{{""=""}}}{{{A(3)^3+B(3)^2+C(3)+D}}}{{{""=""}}}{{{25}}}
{{{a[4]}}}{{{""=""}}}{{{A(4)^3+B(4)^2+C(4)+D}}}{{{""=""}}}{{{12}}}

Simplifying we have the system of equations:

{{{system(matrix(4,11,

A,""+"",B,""+"",C,""+"",D,"",""="","",5,
8A,""+"",4B,""+"",2C,""+"",D,"",""="","",12,
27A,""+"",9B,""+"",3C,""+"",D,"",""="","",25,
64A,""+"",16B,""+"",4C,""+"",D,"",""="","",50 ))}}}

Subtract 1st equation from 2nd equation.
Subtract 2nd equation from 3rd equation.
Subtract 3rd equation from 4th equation.
Get this system:

{{{system(matrix(3,9,

7A,""+"",3B,""+"",C,"",""="","",7,
19A,""+"",5B,""+"",C,"",""="","",13,
37A,""+"",7B,""+"",C,"",""="","",25 ))}}}

Subtract 1st equation from 2nd equation.
Subtract 2nd equation from 3rd equation.
Get this system:

{{{system(matrix(2,7,

12A,""+"",2B,"",""="","",6,
18A,""+"",2B,"",""="","",12
 ))}}}

Subtract 1st equation from 2nd equation.
Get this equation:

{{{matrix(1,5,

6A,"",""="","",6
 )}}}

Solving that we get 

{{{matrix(1,5,

A,"",""="","",1

 )}}}

Substitute A=1 in

{{{matrix(1,7,

12A,""+"",2B,"",""="","",6
)}}}

{{{matrix(1,7,

12(1),""+"",2B,"",""="","",6
)}}}

{{{matrix(1,7,

12,""+"",2B,"",""="","",6
)}}}

{{{matrix(1,5,

2B,"",""="","",-6
)}}}

{{{matrix(1,5,

B,"",""="","",-3
)}}}

Substitute A=1 and B=-3 in

{{{matrix(1,9,

7A,""+"",3B,""+"",C,"",""="","",7)}}}

{{{matrix(1,9,

7(1),""+"",3(-3),""+"",C,"",""="","",7)}}}

{{{matrix(1,9,

7,""+"",3(-3),""+"",C,"",""="","",7)}}}

{{{matrix(1,9,

7,""-"",9,""+"",C,"",""="","",7)}}}

{{{matrix(1,7,

-2,""+"",C,"",""="","",7
)}}}

{{{matrix(1,5,

C,"",""="","",9
)}}}

Substitute A=1, B=-3, and C=9 in

{{{matrix(1,11,

A,""+"",B,""+"",C,""+"",D,"",""="","",5)}}}

{{{matrix(1,11,

1,""-"",3,""+"",9,""+"",D,"",""="","",5)}}}

{{{matrix(1,7,

7,""+"",D,"",""="","",5
)}}}

{{{matrix(1,5,

D,"",""="","",-2
)}}}

The general formula:

{{{a[n]}}}{{{""=""}}}{{{An^3+Bn^2+Cn+D}}}

becomes

{{{a[n]}}}{{{""=""}}}{{{n^3-3n^2+9n-2}}}

The sequence goes:

5, 12, 25, 50, 93, 160, 257, 390, 565, 788, 1065, 1402, 1805,...

Edwin</pre></b></font>