What number comes next in this sequence?

$$4, 15, 13, 7, 22, -1, 31, -9, 40, -17, 49$$.

What comes next? The answer is $$-25$$, but why?

• My answer is 42. The reason is that I like the number 42. And there is no one who can prove me wrong. That being said, if I were to try to read the mind of whoever made this problem, I would look at every other term. – Arthur Nov 24 '18 at 21:52
• Any finite sequence of integers can be continued any way you like. Sometimes there are patterns that suggest that one continuation is more natural than another. I see no such pattern here. If you [edit' the question to tell us where the sequence comes from we may be able to hlep. Otherwise the question will probably be closed. – Ethan Bolker Nov 24 '18 at 21:53
• wolframalpha.com/input/… – AccidentalFourierTransform Nov 25 '18 at 0:11

Break up the sequence into the even ordered terms and odd ordered.

• Wow! I was looking for some very complicated patterns, and it is actually so easy. – Mark Nov 24 '18 at 21:55
• Firs observation, first term and second term add up to 19, third and fourth add to 20, fifth and sixth add to 21 and so on..

According to that, the the next number is $$49+x = 24 \implies x = -25$$

• Second observation, second and third terms add to 28, the fourth and fifth add to 29 and so on...

Therefore, you can generate the next number using these two observations anywhere in the sequence.

I know this is not the best way to predict the next number. However, it is not a bad try.

:)

As a general rule, the simplest kind of sequences of numbers are linear recurrence sequences. It is a matter of finding the recurrence relation. Using the first $$10$$ terms of the sequence, and linear algebra, the generating function appears to be

$$A(x) := \frac{-23 x^4 + 5 x^3 + 15 x^2 + 4 x}{(x^2 - 1)^2} = 4 x + 15x^2 + 13x^3 +\dots$$

with the $$11$$th term $$49$$ being consistent with the generating function.

The $$12$$th term is then $$-25$$ as you stated. The polynomial numerator and denominator coefficients can be found using linear algebra in the general case. In your case, by looking at every other term, you can find that they are both arithmetic progressions with constant differences $$9$$ and $$-8$$.