Does the Look and Say sequence have terms with odd number of digits? (also for other bases)

357 Views Asked by At

I had just put up a question on Puzzling SE about the Look and Say sequence.

I was just curious. In the base-2 sequence, some terms had an odd number of digits. Does the normal base-10 sequence have terms (except the first) with an odd number of digits? In other words, is it possible to generate ten consecutive instances of the same digit?

For which all bases do such terms exist?

And to take this question further, if we can select any base $n$ and any initial term with upto $n/2$ digits, and then calculate the following terms, is it possible to create a term with odd number of digits?

1

There are 1 best solutions below

0
On BEST ANSWER

In base 10 you never need a number bigger than 3. This would also apply to bases 4 and above.

When you read a term in the sequence you will say (count)-(digit)-(count)-(different digit). So it is impossible to have the same digit repeat 4 times.

Additionally you prove that 333 will never occur: Imagine we find the first term had 333 in it. As it was 333 in it then in the previous term we must have "read 3 threes, three-something". But we were looking at the first such term so this is a contradiction.

So the only bases which would have terms of odd length (excluding the first term) would be bases 2 and 3.

Odd Length cases: (base 2 and 3)

Base 2: 1, 11, 101, 111011, 11110101, 100110111011, 111001011011110101, 111100111010110100110111011, 100110011110111010110111001011011110101, 1110010110010011011110111010110111100111010110100110111011, ...

Base 2 Lengths: 1,2,3,6,8,12,18,27,39,58,...

Base 3: 1, 11, 21, 1211, 111221, 1012211, 1110112221, 101102110211, 111021101221101221, 1011012211011222110112211, 1110211011222110211022110212221, 10110122110211022110122110222110121110211, ...

Base 3 Lengths: 1,2,2,4,6,7,10,12,18,25,31,...

Finally if you vary the initial starting value the sequence will still settle down to even lengths (for bases 4+) for the same reasons as above. It may have a few terms near the start which are of odd length due to some specific starting values (e.g. 1111111111 which leads to 101 but that then leads to all even length terms after that).