Interview Question 3799

Created by admin on Mon, 19/11/2012 - 13:23
Question: 

Here is a sequence of numbers: 1 11 21 1211 111221 It seems to be a strange sequence, but yet there is a system behind it... What is the next term in this sequence?

Language: 
Answer: 

Again, the system behind the sequence is that each number "describes" the previous number. Now, however, the number of occurrences of each cipher is counted. So 1231 means one "2" and three times a "1", and 131221 means one "3", one "2", and two times a "1". The number following on 131221 is therefore 132231 (one "3", two times a "2", and three times a "1").

1 11 21 1211 1231 131221 132231 232221 134211 14131231 14231241 24132231 14233221 14233221 etcetera.