There's a fascinating way to generate the Kolakoski sequence with bit fiddling: https://11011110.github.io/blog/2016/10/14/kolakoski-sequenc...