Solve This Pattern

shortylickens

No Lifer
Jul 15, 2003
80,287
17,081
136
sp_0303_08_v6.jpg
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
http://oeis.org/search?q=20%2C+125%2C+200&language=english&go=Search

The online encyclopedia of integer sequences. Apparently, your sequence is uninteresting. :)

So, alternative #2: since there are 4 points, simply run a cubic regression for a best fit curve. With 4 points, the curve can be made to fit those 4 values perfectly.

x=3.75n^3 - 37.5n² + 191.25n - 137.5
for n=1, x=20
for n=2, x=125
for n=3, x=200
and for n=5, x=350, as required by your sequence.

For n=4, x=267.5
and for n=6, x=470

giving you 20,125,200,267.5,350,470
-----

However, you can make up any value you want for the 4th term, and use a quartic regression.

Thus, you can have 20,125,200,700,350, and after running a quartic regression, and finding the value for that quartic regression for the 6th term, you wind up with -3855

So, a perfectly valid answer is 20,125,200,700,350,-3855
This corresponds to the equation x = -72.08333333333n^4+796.666666666n^3-2992.91666666666n^2+4588.3333333n-2300

This equation has the nice feature that x's will always (it appears; I can prove whether this is true or not, but that would cost you) be integers. Those are repeating decimals in the equation; lacking formatting, I chose to write them that way (rather than -2992 11/12 n^2, which isn't as clear.)

The next terms are -16650, -44500, -95600, -179875, -308980, -496300, -756950

What do I win?
 
Last edited:

Fritzo

Lifer
Jan 3, 2001
41,920
2,161
126
When speaking about quantum mechanics, our physics prof used to do this with us:

Solve for this series:

2, 4, 6, 8, 10, ...x

We would all say "12!"

He would say WRONG!, it's "A"

We would say "WTF???"

And he explained:

The entire series is 2, 4, 6, 8, 10, A, 14, 16, 18, 20, 22, B....

You guessed wrong because you didn't look beyond the unknown to get a clue as to what you are looking at. Particle physics is a lot like this. You can not assume anything, because at the quantum level, a whole new series of rules apply than those we are used to. Due to a reason that is 6 steps down the road, there may be a completely unexpected variance that will change your assumed result.

This has blown my mind ever since.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
I'll give you a couple of answers. I gave a huge hint in the terminology that I used for the actual method I used.

For simplicity's sake, let's assume a quadratic equation, for 3 values.
5,8,14
Think of it as 3 ordered pairs, (1,5),(2,8),(3,14)
Since they are non-linear, you can fit a parabola to the three points.
y=ax^2+bx+c
plug in 1 for x, 5 for y,
then 2 for x, 8 for y
3 for x 14 for y
and you get:
a+b+c=5
4a+2b+c=8
9a+3b+c=14
3 equations, 3 unknowns, solved very simply and quickly using linear algebra and matrices.

Alternatively, you can use the x-values of 0,1,and 2, which simply shifts the parabola over 1 unit. Thus, when x=0, c=y. At that point, you can do mental math to solve for a and b. Of course, doing it this way, and shifting it back over 1 unit, would require just as much work as using 1,2,3 for x's.

Thus, with the original 4 values, you end up with 4 equations and 4 unknowns.
If you assume whatever value you want for the 4th term, then you have 5 equations and 5 unknowns - pretty trivial stuff to solve using linear algebra, especially if you have a calculator available that handles matrices.

But, if you grab, for example, a TI83+ that handles matrices fairly well, you may as well simply enter the coordinate pairs in the lists and have the calculator do a cubic or quartic regression, since the best fit curve will, of course, pass exactly through those points (provided there is one more value than the degree of the polynomial.)