Sequence next in sequence

From Math Puzzle Wiki
Revision as of 06:10, 25 July 2017 by Oscarlevin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This sequence guessing puzzle hides a beautiful, well known sequence.

Puzzle

What comes next: 1, 2, 2, 1, 1, 2, 1, ....?

Help

Hint
Count the number of repeating digits.
Answer
2
Solution
This is the famous Kolakoski sequence (see the wikipedia page listed below). The sequence self-encodes the run length of repeated digits. These run lengths are 1, 2, 2, 1, 1, 2, 1,...., which is the sequence again.

Bonus

Find a sequence using the numbers 1, 2, and 3 that has the same property as the one above.

References

Wikipedia page (contains spoilers).