Fun with numbers

Remember the math puzzle?

You have the following sequence of terms:
1
11
21
1211
111221
312211
13112221

What is the algorithm? What is the next term?

— Spoiler warning. Continue at your own risk. —

The next term is 1113213211.
And the one after that, 31131211131221.

This is called the Look-and-say sequence. Wikipedia says that:

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 1’s” or 21.
  • 21 is read off as “one 2, then one 1″ or 1211.
  • 1211 is read off as “one 1, then one 2, then two 1’s” or 111221.
  • 111221 is read off as “three 1, then two 2, then one 1″ or 312211.

Apparently it was extensively studied in the 80’s by a certain mathematician dude called John Conway. He discovered quite a few interesting properties for this sequence, especially the fact that certain patterns emerge that are somehow similar to chemical elements.

Surprisingly enough, my friend Irina knew about this puzzle from a romanian book called Cireşarii, by Constantin Chiriţă, which was written in the 50’s.

A bit of Wikipedia research (aka procrastination) revealed that this John Conway guy is also responsible for only the most amazing cellular automaton (man, I love the sound of it) in the world, Conway’s Game of Life.

But let’s return to our Look and Say Sequence. I think I might have discovered a new property. Let me first define the concept of “average digit” for a term. It’s the sum of digits divided by the number of digits.

The interesting thing about this “average digit” is that it converges to a certain value. See this table, and this graph.

I’d really like to know how to get that exact value. Perhaps it’s the root of a polynomial or something. I asked some math people, but I didn’t get much help.

In addition to that, Cristian, my friend here at work suggested that I should try and see if there is a pattern in the spectral density, in other words, the percentage of one’s two’s and three’s.

As expected, and as can be seen here, these percentages also converge to certain values (about 50% for one’s, 30% for two’s and 20% for three’s).

Last but not least, I’d like to show you a great way of representing a Look and Say term, it looks a bit fractal-like. Check it out here.

This entry was posted in General and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted March 10, 2009 at 9:28 pm | Permalink

    You seam to have a magnet for these kind of things! :)

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*