Kolakoski Sequence
In mathematics, the Kolakoski sequence, sometimes also known as the Oldenburger-Kolakoski sequence, is an infinite sequence of symbols {1,2} that is its own run-length encoding and the prototype for an infinite family of related sequences.
1,2,2,1,1,2,1,2,2,1,2,2,1,1,2,1,1,2,2,1,2,1,1,2,1,2,2,1,1……
HOW THIS WORKS
This is a self generating series which runs its own length.
This might sound confusing but this is how it works-
The initial numbers are 1,2,2 and then the last number from here generates that value of the other number.
Like when this starts the series is 1,2,2 and then since the last number is 2, the other number (1) runs twice
Hence the series becomes as such 1,2,2,1,1.
Now the next number(after the previous number used to generate a run) is 1.
So the other number (2) runs once.
The series becomes : 1,2,2,1,1,2.
Now we use the next term which is 1 again to generate a run for the number 1
The series becomes 1,2,2,1,1,2,1.
And we can continue this forever.
Thats why its called a self generating series.
You can try making a similar series with different numbers!!
Art piece made by the Kolakoski Sequence
Comments