# 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.

What if applet does not run? |

## 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 anda , the rseult is the famous Fibonacci sequence.)_{1}= 1,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

**Note**: it is very important that you understand that the patterns you looking for in this kind of exercises are not necessarily serve the intended answer. Yes, they are what is expected in official examinations, but rarely in, say, intelligence tests or at job interviews. As an example, what do you think is the next number in the sequence 7, 14, 21, 28?

Do give it a thought before reading an answer.

|Contact| |Front page| |Contents| |Games|

Copyright © 1996-2018 Alexander Bogomolny### What is the next number in the sequence 7, 14, 21, 28?

No doubt you thought that it should be 35, right? 35 comes naturally the moment you detect the "arithmetic progression" pattern. However, there are many ways to look at the given sequence. Assume we list the dates (omitting the month) of consecutive Mondays, say. Then, if the given four are the March's Mondays then the first April Monday will be April 4, so that the sequence would be 7, 14, 21, 28, 4. If the sequence is that of April's Mondays, then the continuation is different: 7, 14, 21, 28, 5; for, the next Monday is May 5. It is more confusing if the listed Mondays happened to be in February. For the leap year, the next term would be 6; for the regular year it is 7.

You see, you can't always assume a definite answer.

Another curiousity comes from an article by Roger Penrose: Find the missing number in the sequence

7, 9, 12, ?, 24, 36, 56, 90

Answer: 24·ln(2)!

Why? Evaluate the formula f(n) = 24(2^{n}- 1)/n for n = -3, -2, -1, 1, 2, 3, 4. The value f(0) is missing, but could be found via the l'Hôpital rule!

### References

- R. Penrose,
, in*Variations on a Transcendental Theme**Puzzlers' Tribute*, D. Wolfe, T. Rodgers (eds), A K Peters, 2002, 361-364

|Contact| |Front page| |Contents| |Games|

Copyright © 1996-2018 Alexander Bogomolny65617925