What Comes Next?
September 20, 2019
This is a Microsoft interview question:
What is the next number in the sequence: 8, 13, 17, 22, 24, 26, 29, 31, 35, …?
Your task is to solve the puzzle. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.
Just looking at the ones digit I see the following:
8 3 7 2 4 6 9 1 5
Which is 1 to 9 in an unusual arrangement. If the pattern holds the next ten numbers would be
38 43 47 etc.
How are you supposed to figure this out in an interview?
Or maybe the ones from oeis.org/a178968…..
37
I found this relationship between these numbers.
If you separate numbers from 4 to 4, you add the fourth and the first and you add the second and the third you get the same exact number
13 + 17 = 30
8 + 22 = 30
24 + 31 = 55
26 + 29 = 55
then there is a relationship between the separated 4 numbers the first and second and the third and fourth have the same exact difference in both cases and the difference between second and third
is different
8,13,17,22
5 4 5
24,26,29,31
2 3 2
following this logic the differences can create a succession
5, 4, 5
2, 3, 2
-1, 2,-1
and using the nineth number (35) following this logic the next 3 numbers will be:
35,34,36,35
and then you add the first and fourth and the second and third you get the same exact number as in the first and second case
35 + 35 = 70
34 + 36 = 70
So i guess the answer is 34
i dont know if actually is the answer or i was overthinking