1, 1, 2, 11, 12, 13, 112, 113, 114, 1104, 2004, 2012, 1031, 123, ...
Name the next few numbers in the sequence. What is the ultimate fate of this sequence?
(In reply to
Answer by K Sengupta)
Let T(n) = nth term of the sequence.
Then,
Units digit of T(n) = # 1's in T(n-1) and T(n-2) taken together.
Tens digit of T(n) = # 2's in T(n-1) and T(n-2) taken together.
Hundred digit of T(n) = # 3's in T(n-1) and T(n-2) taken together, and so on.
Accordingly, we must have:
T(13) = 1031 (given)
T(14) = 123 (given), so that:
T(15) = 213
T(16) = 222
T(17) = 141
T(18) = 1032
T(19) = 1113
T(20) = 214
T(21) = 1114
T(22) = 2014
T(23) = 2014
T(24) = 2022
T(25) = 1041
T(26) = 1031
T(27) = 1032
T(28) = 213
T(29) = 222
T(30) = 141
-----------
----------, and so on.
Consequently, we can now assert that:
(i) The respective missing 15th term, 16th term and the 17th term are 213, 222 and 141.
(ii) From the 18th term onwards, the given sequence will loop indefinitely.