## Brainteaser 1547: Doing the rounds

From The Sunday Times, 3rd May 1992 [link]

This week, I share a find-the-next-row puzzle that is doing the rounds of dons’ whiteboards:

1
1 1
2 1
1 2 1 1
?

To avoid invasion of ivory towers, I will give you the answer:

1 1 1 2 2 1

with the explanation that, starting with the initial 1, each subsequent row is obtained by reading the previous row. Thus, row five is formed (with reference to row four) from one “one”, followed by one “two”, and terminating with two “one”s.

However, I do have four questions about the first billion rows of this sequence.

1. What is the largest digit that can be found anywhere?
2. What is the largest number of ones that can occur consecutively in any single row?
3. Repeat (2), looking for twos instead.
4. Repeat (2), looking for threes instead.

Multiply each answer by its question number and send in the total.

This puzzle was selected for the book Brainteasers (2002, edited by Victor Bryant), in which it appeared in the following form:

Consider the sequence:

1
11
21
1211
111221
312211

You might like to try and work out the next few terms before reading on and trying the rest of this Teaser.

In fact, having started with 1, each subsequent term simply reads the previous line. So, for example, after 111221 we note that this consists of:

three ones, two twos, one one

i.e. the next term is simply:

312211

Here are some questions about the first billion terms of this sequence:

(a) What is the largest number of consecutive ones in any term?
(b) What is the largest number of consecutive twos in any term?
(c) What is the largest number of consecutive threes in any term?
(d) What is the largest digit which can be found in any term?

[teaser1547]