# find formula for series

• September 2nd 2010, 07:30 PM
Tclack
find formula for series
so If I listed the first few digits of a sequence, is there a method to break it down and determine the general equation for the nth term of a sequence?

for example:
Given:
1, 9, 37, 100, 225, 325

Does there exist a method to determine the equation is $(\frac{x(x+1)}{2})^2$

or even break it down as the series of $x^3$
• September 2nd 2010, 08:25 PM
TKHunny
No, no, No, and no. There is NO general formula. For any finite set, there are infinitely many solutions. Just pick one!

Constant 5th Ratios, the next value is 97.9471
Constant 5th Differences, the next value is 73

I think that nasty 37 is a bit of a problem.
• September 2nd 2010, 08:31 PM
Tclack
ok, well, maybe not a formula, but is there a popular algorithm used?

(oh, and I messed up, that was supposed to be a 36)
• September 2nd 2010, 09:42 PM
undefined
Quote:

Originally Posted by Tclack
ok, well, maybe not a formula, but is there a popular algorithm used?

(oh, and I messed up, that was supposed to be a 36)

As TKHunny pointed out, the problem with your original question is the word "the" in "the general equation". To elaborate, it is always possible to fit a sequence of n terms to a polynomial of degree n-1. From this alone we see there are infinitely many solutions.

Besides looking at constant nth differences we can think of solving a system of n linear equations in n unknowns. This can be done by hand (it can be pretty long) or with a machine, using linear algebra or more basic techniques.

Here's a nice article on the subject: When Every Answer Is Correct: Why Sequences and Number Patterns Fail the Test, by Donald L. White (PDF)
• September 4th 2010, 08:49 AM
Soroban
Hello, Tclack!

Do you REALLY want to see the whole procedure?
Also your sequence is off . . . I'll correct it.

Quote:

If I listed the first few digits of a sequence,
is there a method to determine the general equation for the nth term

For example
Given: . $1,\:9,\:36,\:100,\:225,\;441,\:784,\: \hdots$

Does there exist a method to determine the equation is: $\left[\frac{n(n+1)}{2}\right]^2$?

We can "eyeball" the answer if we know some of mathematical trivia.

First, we recognize the sequence: . $1^3,\:3^2,\:6^2,\:10^2,\:15^2,\:21^2,\:\hdots$

. . These are the squares of consecutive Triangular Numbers.

Then we know that the $n^{th}$ Triangular Number is: . $\dfrac{n(n+1)}{2}$

Therefore, the generating function is: . $f(n) \;=\;\left[\dfrac{n(n+1)}{2}\right]^2$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Doing it "the long way", takes quite a while.

Take differences of consecutives terms of the sequence,
. . then take the differences of the differences, and so on.

It looks like this:

$\begin{array}{ccccccccccccccc}
\text{Sequence:} & 1 && 9 && 36 && 100 && 225 && 441 && 784 \\
\text{1st differences:} && 8 && 27 && 64 && 125 && 216 && 343 \\
\text{2nd differences:} &&& 19 && 37 && 61 && 91 && 121 \\
\text{3rd differences:} &&&& 18 && 24 && 30 && 36 \\
\text{4th differences:} &&&&& 6 && 6 && 6 \end{array}$

Since the fourth differences are constant,
. . the function is of the fourth degree . . . a quartic.

The general quartic function is: . $f(n) \;=\;an^4 + bn^3 + cn^2 + dn + e$
. . and we must determine $a,b,c,d,e.$

Use the first five terms of the sequence and set up a system of equations.

$\begin{array}{cccccc}
f(1) = 1\!: & a + b + c + d + e &=& 1 & [1] \\
f(2) = 9\!: & 16a + 8b + 4c + 2d + e &=& 9 & [2] \\
f(3) = 36\!: & 81a + 27b + 9c + 3d + e &=& 36 & [3] \\
f(4) = 100\!: & 256a + 64b + 16c + 4d + e &=& 100 & [4] \\
f(5) = 225\!: & 625a + 125b + 25c + 5d + e &=& 225 & [5]
\end{array}$

$\begin{array}{cccccc}
\text{Subtract [2]-[1]:} & 15a + 7b + 3c + d &=& 8 & [6] \\
\text{Subtract [3]-[2]:} & 65a + 19b + 5c + d &=& 27 & [7] \\
\text{Subtract [4]-[3]:} & 175a + 37b + 7c + d &=& 64 & [8] \\
\text{Subtract [5]-[4]:} & 369a + 61b + 9c + d &=& 125 & [9]
\end{array}$

$\begin{array}{ccccccc}
\text{Subtract [7]-[6]:} & 50a + 12b + 2c &=& 19 & [10] \\
\text{Subtract [8]-[7]:} & 110a + 18b + 2c &=& 37 & [11] \\
\text{Subtract [9]-[8]:} & 194a + 24b + 2c &=& 61 & [12]
\end{array}$

$\begin{array}{ccccccc}
\text{Subtract [11]-[10]:} & 60a + 6b &=& 18 & [13] \\
\text{Subtract [12]-[11]:} & 84a + 6b &=& 24 & [14] \end{array}$

$\begin{array}{ccccccc}
\text{Subtract [14]-[13]:} & 24a \;=\;6 & \Rightarrow & \boxed{a \;=\;\frac{1}{4}} \end{array}$

$\text{Substitute into [13]: }\;60(\frac{1}{4}) + 6b \:=\:18 \quad\Rightarrow\quad \boxed{b \:=\:\frac{1}{2}}$

$\text{Substitute into [10]: }\;50(\frac{1}{4}) + 12(\frac{1}{2}) + 2c \:=\:19 \quad\Rightarrow\quad \boxed{c \:=\:\frac{1}{4}}$

$\text{Substitute into [6]: }\;15(\frac{1}{4}) + 7(\frac{1}{2}) + 3(\frac{1}{4}) + d \:=\:8 \qud\Rightarrow\quad \boxed{d \:=\:0}$

$\text{Substitute into [1]: }\;\frac{1}{4} + \frac{1}{2} + \frac{1}{4} + 0 + e \:=\:1 \quad\Rightarrow\quad \boxed{e \:=\:0}$

Therefore: . $f(n) \:=\:\frac{1}{4}n^4 + \frac{1}{2}n^3 + \frac{1}{4}n^2 \;=\;\dfrac{n^2(n^2+2n+1)}{4}$

. . . . . . . . . $f(n) \;=\;\dfrac{n^2(n+1)^2}{4} \;=\;\left[\dfrac{n(n+1)}{2}\right]^2$

• September 6th 2010, 06:47 PM
Tclack
Wow, this is exactly what I was looking for. Did you come up with it on your own or is it a standard method?

I've tried this. and it works for polynomials. It doesn't work so well if I write a bunch random numbers down, I'll either get a few constants in a row and then some different numbers, or I'll get Negative differences between terms, but I'll try some more

I'm going to try to see if you can do it with powers to the x too

I really appreciate your efforts in doing all of that too; it must have taken some time
• September 7th 2010, 12:37 AM
Opalg
Quote:

Originally Posted by Tclack
so If I listed the first few digits of a sequence, is there a method to break it down and determine the general equation for the nth term of a sequence?

for example:
Given:
1, 9, 37, 100, 225, 325

Does there exist a method to determine the equation is $(\frac{x(x+1)}{2})^2$

or even break it down as the series of $x^3$

By far the best method is to plug your sequence into the amazing Online Encyclopedia of Integer Sequences. If you do this with the sequence 1, 9, 37, 100, 225, 325, it will tell you that it does not recognise that sequence. If you replace the 37 with 36 it still won't recognise it. But if you also correct the 325 to 441 it will give you several possible sequences to choose from, with loads of information about each of them.
• September 7th 2010, 08:36 AM
HallsofIvy
Given a set of n numbers, there exist a unique n-1 degree polynomial that takes on those values for n=1, 2, ... One way of finding that polynomial is to write out the general form for an n-1 degree polynomial, put in the values of and the given values, and solve for the coefficients.

For example, if the list of numbers given is "1, 5, 3, 2" then I know there exist a third degree (cubic) polynomial taking on those values: p(1)= 1, p(2)= 5, p(3)= 3, p(4)= 2. Any cubic polynomial can be written as $p(x)= ax^3+ bx^2+ cx+ d$. In order to take on those values, we must have:
$p(1)= a+ b+ c+ d= 1$
$p(2)= 8a+ 4b+ 2c+ d= 5$
$p(3)= 27a+ 9b+ 3c+ d= 3$
$p(4)= 64a+ 16b+ 4c+ d= 2$
You can solve those four equations for a, b, c, and d.

Another way of producing the same polynomial is "Newtons difference method"

If we have a series of numbers and want a polynomial such that p(0)= a, p(1)= b, p(2)= c, p(3)= d, etc., we can look at their "differences", "second differences", "third differences", etc. until we get a constant (or, if there is a finite set of numbers, we run out of numbers to subtract) and develop the polynomial from that. Using " $\Delta(n)$" to mean the "first difference", b- a, c- b, d- c, etc., " $\Delta^2(n)$" to mean the "second difference", $\Delta^2(0)= \Delta(1)- \Delta(0)$, etc. we can write the polynomial as $p(0)+ \Delta(0)n+ \frac{\Delta^2(0){2!}n(n-1)+ \frac{\Delta^3(0)}{3!}n(n-1)(n-2)+ \cdot\cdot\cdot$. Notice the similarity to the Taylor's series at x=0.

Notice that we have to start with n= 0, not n= 1. That is easily take care of- just subtract 1 from each n to start with, then after you have the formula, replace n with n+1.

Using the sequence above, p(1)= 1, p(2)= 5, p(3)= 3, p(4)= 2, we think of it as p(0)= 1, p(1)= 5, p(2)= 3, p(3)= 1. Then the "first differences" are $\Delta(0)= 5- 1= 4$, $\Delta(1)= 3- 5= -2$, and $\Delta(2)= 1- 3= -2$. The "second differences" are $\Delta^2(0)= \Delta(1)- \Delta(0)= -2- 4= -6$ and $\Delta^2(1)= \Delta(2)- \Delta(1)=-2- (-2)= 0$. The "third difference" is $\Delta^3(0)= \Delta^2(1)- \Delta^2(0)= 0- (-6)= 6$.

Notice that there are 4 given values so 3 "first differences", 2 "second differences", 1 "third difference", and no higher differences. Putting those into the formula above will give a cubic equation. In general, if you start with "n" numbers, you will have differences up to the "n-1" difference giving a n-1 degree polynomial.

Our formula becomes $p(0)+ \Delta(0)n+ \frac{\Delta^2(0){2!}n(n-1)+ \frac{\Delta^3(0)}{3!}n(n-1)(n-2)= 1+ 4n+ (-6)/2! n(n-1)+ 6/3!n(n-1)(n-2)= 1+ 4n- 3n(n-1)+ 2n(n-1)(n-2)$.

You should be able to show that these two formulas give the same polynomial.

Of course, there is no guarentee that this polynomial will give the next number in the sequence! As several people have told you, unless you have specific information about the "form" of the sequence, knowing any number of terms tells you nothing about what the very next term will be, much less all remaining terms.
• September 10th 2010, 05:29 PM
TKHunny
Quote:

Originally Posted by Soroban
[size=3]Do you REALLY want to see the whole procedure?

This language has the same problem as the original question. "THE" procedure does NOT exist. That is the way one person approaches such useless problems. There are many, many other ways. Just refuse to use the language that indicates there is only one procedure and only one answer. One day, perhaps in the lifetime of my grandchildren, this sort of silliness will have passed away into oblivion.
• September 14th 2010, 08:07 AM
wonderboy1953
With sequences (unless there's limiting conditions), you can have more than one formula or method that would cover the sequence.