Hello there math people!
A friend of mine has recently introduced me to a little math puzzle.
You have the following series of numbers:
1
11
21
1211
111221
312211
13112221
1113213211
The question is, what is the algorithm used for generating these series.
-SPOILER FOLLOWS-
Take the sixth series, for example (312211).
You get the seventh series based only on the previous series, in the following manner:
You have one "3" digit, so the first two digits of the seventh series are 13.
Then you have one "1" digit, so the next two digits of the seventh series are 11.
Then you have two "2" digits, so the next two digits of the seventh series are 22.
And then you have two "1" digits, so the last two digits of the seventh series are 21.
OK. That was fun enough, so I thought I could write a little PHP script to see what interesting properties I can find. For example I wondered if there was ever foing to be a 4 anywhere, and stuff like that. I was also curious whether there was a pattern for the number of digits in each string, or for their sum.
Here is a link to it:
http://www.cozmoslabs.com/projects/tbd/ ... 00&rows=15
Results?
Well, I found out that 4 never comes up, and I could find no pattern for the number of digits or for their sum, BUT something really unexpected came up: I calculated the average digit, I mean the sum of the digits divided by the number of digits in every string. AND apparently, as you iterate further and further, this average converges to a certain value of about 1.689
Here is another link, with more iterations:
http://www.cozmoslabs.com/projects/tbd/ ... 40&rows=40
SO, at last, my question: How can I get that value? I suspect it might be something like sqrt(a)*b/c, where a, b and c are integers, or whatever.
Regards, Gabriel




