This is much more complicated than I originally thought. Not only do you run up against testing string length maximums but you need to worry about exceeding integer lengths while doing this counting. Writing a truly valid script is a challenge. Even if we get this running properly there is the question of how much space is being consumed by the string in reality.

I tend to agree with Richard comments in the original post, this exercise has become mainly an intellectual or thought exercise. It is possible an exact answer may be not be verifiable without a question being posed to Ruud.

Jens,

If it were not for the long run times, I think it would make a good kixgolf game - Counting the uncountable. [Wink]
_________________________
Jack