Qm

The sequence that describes its own runs

A sequence uses only the digits 1 and 2:

2, 2, 1, 1, 2, 1, 2, 2, 1, ?, ?

Find the rule and the next two terms. As a clue, write down the lengths of the runs of equal digits in the sequence and compare with the sequence itself.

Show a hint

Runs: "2, 2" is a run of length 2; "1, 1" a run of length 2; "2" a run of length 1; "1" length 1; "2, 2" length 2; "1" length 1. Read those lengths in order.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

77, 49, 36, 18, what next?1, 4, 9, 61, 52, 63, 94, what next?10, 11, 12, 13, 14, 20, 22, 101, what next?A sentence nobody on the island can say1, 1, 2, 5, 14, 42, what next?
All questions →