Today I have something similar to the cubic function discovery I did exactly two weeks ago. It's somewhat more complex, and therefore more fun. Long? Yes. Fun? Oh, yeah!
Find the nth term: 2, 8, 20, 40, 70, 112, 168, ...
Once again, the genre of "short question, super long answer". Those are the most fun, so let the fun begin.
When you get a sequence and you need to find the nth term, go for differences between numbers. Those differences hide a big secret within them. If the differences are the same, it's a simple arithmetic series. If the differences are not the same, do the differences of the differences. If now they're equal, the relation between the numbers goes through a quadratic expression. If the differences are still not the same, take the differences again and again until they are equal. The number of times you take the differences is the degree of the expression that connects the numbers.
If you see that the differences have a certain ratio to them (for example, try to find the differences for 4, 10, 28, 82, 244, 730), don't bother going more than once or twice. You are dealing with an exponential relation here.
So, let's find the differences of the sequence we're given:
2, 8, 20, 40, 70, 112, 168
6 12 20 30 42 56
6 8 10 12 14
2 2 2 2
Jackpot. We reached equal differences after three times, so the numbers are connected via a cubic expression. To find that expression, we need to set up a system of 4 equations with 4 variables (if you don't know or don't remember, open the link at the top of the post).
Let's call the points that this "function" goes through (1, 2) (2, 8) (3, 20) (4, 40). Now let's set up the system:
a + b + c + d = 2
8a + 4b + 2c + d = 8
27a + 9b + 3c + d = 20
64a + 16b + 4c + d = 40
Subtract the equations from each other to eliminate d:
7a + 3b + c = 6
19a + 5b + c = 12
37a + 7b + c = 20
Subtract them again to eliminate c:
12a + 2b = 6
18a + 2b = 8
And once again:
6a = 2
a = 1/3
Let's start plugging:
12/3 + 2b = 6
4 + 2b = 6
2b = 2
b = 1
Again:
7/3 + 3 + c = 6
c = 2/3
Finally:
1/3 + 1 + 2/3 + d = 2
d = 0
Well, that makes it easier. The nth term is given by:
n3/3 + n2 + 2n/3
Go ahead, plug your number for n and see that it works. For all terms, even the ones which were not included in the calculation.
Enjoy your new knowledge,
Nadav
nadavs
Showing posts with label find cubic function. Show all posts
Showing posts with label find cubic function. Show all posts
Thursday, May 29, 2008
Cubic Sequences
Subscribe to:
Posts (Atom)