# Look and Say Sequence Game: Code Theory

In mathematics, the look-and-say sequence is the sequence of integers beginning as follows:

1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, …

It was developed by mathematician John Conway in the 1950s.

John Horton Conway (born 26 December 1937) is an English mathematician active in the theory of finite groups, knot theory, number theory, combinatorial game theory and coding theory. He has also contributed to many branches of recreational mathematics, notably the invention of the cellular automaton called the Game of Life. Conway is currently Professor Emeritus of Mathematics at Princeton University in New Jersey.

To generate a member of the sequence from the previous member, read off the digits of the previous member, counting the number of digits in groups of the same digit. For example:

1 is read off as "one 1" or 11.

11 is read off as "two 1s" or 21.

21 is read off as "one 2, then one 1" or 1211.

1211 is read off as "one 1, one 2, then two 1s" or 111221.

111221 is read off as "three 1s, two 2s, then one 1" or 312211.

The sequence grows indefinitely. In fact, any variant defined by starting with a different integer seed number will (eventually) also grow indefinitely, except for the degenerate sequence: 22, 22, 22, 22, …

No digits other than 1, 2, and 3 appear in the sequence, unless the seed number contains such a digit or a run of more than three of the same digit.

This is really an exercise in concentration. Also, can you see a pattern in the number of digits with a different starting number?

AttachmentSize