Generates the Kolakoski sequence, an integer sequence defined by its own run lengths. Users input a desired length for the output sequence, and the tool calculates the unique arrangement of integers required to form that self-describing pattern. The sequence is characterized such that if you count consecutive runs of identical numbers within the resulting series—for example, three 4s followed by two 1s—the list of those counts exactly matches the numbers appearing in the same order within the sequence itself.
Individuals studying number theory or discrete mathematics use this utility to explore properties of self-referential sequences. Students and researchers can quickly generate long examples of the Kolakoski sequence, allowing for pattern analysis and testing mathematical hypotheses without manual calculation.