The Kolakoski sequence $1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, ... $is an example of what people call a self-reading sequence: ${a_n}$ is defined to be the sequence of $1's$ and $2's$ whose first term is $1$, and each subsequent term an is the length of the nth run (of ones or twos). In more detail,
sequence $1,~~~~~~ 2,2,~~~~~~1,1,~~~~~~ 2,~~~~~~1,~~~~~~ 2,2,~~~~~~ 1,~~~~~~ 2,2, ...$
run length $1 ~~~~~~2~~~~~~~~~~~~ 2 ~~~~~~~~~~~~ 1~~~~~~~~ 1~~~~~~~~~~ 2 ~~~~~~~~~ 1~~~~~~~~~~~ 2$
Start with $a_1 = 1$. The rule says that the first run (which is a single $1$) has length $1$. Thus $a_2$ must be different, so that $a_2 = 2$. The second run therefore has length $2$, which forces the third term, $a_3$, to be a two also. This completes the second run, so the third run begins with $1$; since its length is $2$ we have $a_4 = 1$ and $a_5 = 1$. The fourth and fifth runs are consequently the singletons $2$ then $1$. And so on.
Prove that $x=0,122112122122...$ is irrational
I have the solution but I didn't understand it.
The problem reduces itself to prove that Kolakoski sequence isn't periodic.
Let's assume for the sake of contradiction that the sequence is periodic , and let $u_n$ be the n-th term of the sequence.
That the sequence is periodic means that there exist a period $t$ such that $u_{n+t}=u_n$ , let t be the smallest number that satisfies this property.
Let $a$ (resp b) be the number of $i$ ($0\le i \le t)$ suhthat $u_i=1$ (resp $u_i=2$), it is obvious that we have $a+b=t$ . By the definition of the sequence , $a+2b$ is also a period of the sequence , hence $a+b$ divides $a+2b$ because $a+b$ is the smallest period , so $a=0$ or $b=0$ which is impossible .
so $x$ is irrational
what I didn't understand is why $a+2b$ is also a period of the sequence.
Under the assumption to be contradicted, the first $t=a+b$ describe how the sequence begins with some combination of $a$ length-$1$ runs and $b$ length-$2$ runs, which comprise the first $a+2b$ terms of the sequence. Then the second group of $t$ terms matches the first group of $t$, so the exact same pattern of $a$ length-$1$ runs and $b$ length-$2$ runs (hence the same pattern of $1$s and $2$s in the first $a+2b$ terms) repeats after the first $a+2b$ terms described by the first $t$ terms.