# Strange Sequence

On a recent math test, I was challenged by the following question.

 What are the next three terms in this sequence: 5, 12, 10, 10, 16, 13....?


Hint: We were given four possibilities for the next term: 24, 28, 32, 26.

-
All 4 are correct. – Raskolnikov Mar 15 '13 at 11:14
This is a math test ? Well, 42 is a nice answer too. – Jean-Claude Arbaut Mar 15 '13 at 11:14
@arbautjc, it is probably not 42. No one knows what is THE question whose answer is 42! – achille hui Mar 15 '13 at 13:50
... and also I have to insist on the fact that the answer is 42! and not 42! $\\$ And that this is also due to G.H. Hardy! (As found according to go.helms-net.de/math/divers/GHHArdyAndTheNumber42.htm ) – Gottfried Helms Mar 16 '13 at 11:16
$$\begin{array} {rrr} 5 & 12 & 10 \\ 10 & 16 & 13 \\ & & & \text{ so ...} \\ 15 & 20 & 16 \\ \end{array}$$ are the best guessed next three numbers... – Gottfried Helms Mar 16 '13 at 11:25

The following recursion relation generates a sequence satisfying your conditions, provided you take (5,12,10) as the first three terms: $$302 a_{n+3} = 306 a_{n} + 165 a_{n+1} - 49 a_{n+2}$$. The next term is then $5063/302$. I can also make a sequence satisfying a fourth order linear recursion relation for each of the proposed solutions.

For 24: $a_{n+4}= 0.3039216 a_{n+1} + 1.6339869 a_{n+2} - 0.3986928 a_{n+3}$.

For 28: $a_{n+4}= - 0.0882353 a_{n+1} + 2.2352941 a_{n+2} - 0.5294118 a_{n+3}$.

For 32: $a_{n+4}= - 0.4803922 a_{n+1} + 2.8366013 a_{n+2} - 0.6601307 a_{n+3}$.

For 26: $a_{n+4}= 0.1078431 a_{n+1} + 1.9346405 a_{n+2} - 0.4640523 a_{n+3}$.

And that is just restraining myself to linear difference equations of fourth order. If I allow higher order, or any type of non-linearity, I can produce you any sequence you want.

There's no need to go that far, what prevents me from decreeing that every term after that is just $0$? It's a perfectly valid sequence.

The point is, this kind of exercises have little to do with math and all to do with what was the person making the sequence thinking of.

-
You mean difference equations, not differential equations. – Chris Eagle Mar 15 '13 at 12:47
Sure thing. Thanks for the remark. – Raskolnikov Mar 15 '13 at 12:48

A way I see is, starting with the fourth number,

take the fourth number and subtract the first 10-5=5

take the fifth number and subtract the second 16-12=4

take the sixth number and subtract the third 13-10=3

so the next number in your list should be 22 so that 22-10=2

but woe is me...22 is not one of the choices. Like Raskolnikov said, you tell me what do you WANT the next number to be in the sequence and I'll make up a relation to generate it. One easy way is polynomials.

-