Basically, you take the binary representation of a number, split it on 0
s, and count the number of digits in each position. For example, 11 (1011
) would become 1
and 11
, and then [2, 1]
. Then you just flatten it.
It starts with 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1