What's next?
The applet below presents you with a sequence of numbers. It's your task to surmise
the pattern and guess what would be the next term. Sometimes a pattern may not be unique.
This may be very frustrating for which I am sorry. However, this exercise besides being
useful and sometimes also enjoyable occupation, affords an opportunity to discuss topics
that I consider interesting.

This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.

Algorithms used
The applet randomly selects one of the following algorithms . In turn, each
of the algorithms has its own random parameters which are mostly coefficients in various formulas.

Arithmetic series.
a_{0} , a_{0} + d, a_{0} + 2d, a_{0} + 3d, .

Geometric series.
a_{0} , a_{0} q, a_{0} q^{2} , a_{0} q^{3} , .

Alternate addition and multiplication.
a_{0} , a_{1} = a_{0} + d, a_{2} = a_{1} ·q, a_{3} = a_{2} + d, .

Alternate addition of two different quantities.
a_{0} , a_{1} = a_{0} + d_{a} , a_{2} = a_{1} + d_{b} , .

Self-descriptive sequence.
Write a simple number, say, 21. Now scan the number by groups of equal digits at a time. Here
we have one "2" and one "1". Thus the next number will be 1211. In this number we have one "1",
one "2" and two "1"s. Thus the third number - 111221. The next will be 312211.

Sum of preceding two.
a_{0} and a_{1} are random. a_{2} = a_{0} + a_{1} , a_{3} =a_{1} + a_{2} , . (If a_{0} = 0 and a_{1} = 1, , the rseult is the famous Fibonacci sequence .)

Three-term sum sequence.
a_{0} , a_{1} and a_{2} are random. a_{3} = a_{0} + a_{1} + a_{2} , .

Shifted powers.
a_{n} = a_{0} + bq^{n}
Just add a constant to all the members of a geometric series and what a difference!

Second degree polynomial.
a_{n} = an^{2} + bn + c

It's easy to detect this case. Take differences of successive terms:

M_{n} = a_{n + 1} - a_{n}
= a((n + 1)^{2} - n^{2} ) + b((n + 1) - n) + (c - c)
= a(2n + 1) + b

So that the differences prove to be the values of a first order polynomial. Taking "second order" differences we get constants:

M_{n} - M_{n-1} = a((2n + 1) - (2n-1)) + (b-b)
= 2a

Copyright © 1996-2008 Alexander Bogomolny

Amazon.com Widgets