Generate Kolakoski Numbers

This tool creates a Kolakoski sequence based on your preferences. You choose how many terms you want, whether to display the sequence line-by-line or inline, and whether to start with 1. There’s also a toggle to include index numbers for each value. Output updates instantly and reflects any setting you change.

Everything happens live in the browser, with no reloads or delays. You can easily copy the results or export them as a file.

Total items: 0
Options
Line-by-line output
Show index numbers
Start with 1

How to Use:

  1. Enter how many Kolakoski numbers to generate in the input box.
  2. Adjust your preferences using the toggles:
    • Start with 1 (or 2)
    • Format the output line-by-line or inline
    • Show or hide index numbers
  3. Watch the output update in real-time in the right-hand box.
  4. Use “Copy Output” or “Export to File” once you’re happy with the result.
  5. Hit “Clear All” to reset everything.

What Generate Kolakoski Numbers can do:

The Options box gives you control over how the Kolakoski sequence appears. You can choose to begin with 1 or 2, which slightly changes the sequence. The line formatting helps you scan or copy it more easily. Index numbers are useful for reference when studying the pattern or debugging a sequence.

Everything you change applies immediately, and there’s a counter showing how many items were generated. It’s all built for quick feedback and smooth interaction.

Example:

Input:

20

Settings: Start with 1: ON, Line-by-line: ON, Show index: OFF

Output:

1
2
2
1
1
2
1
2
2
1
2
2
1
1
2
1
1
2
2
1

Common Use Cases:

Use this when you want to generate and inspect Kolakoski sequences, either for number theory, programming challenges, or just to study the run-length encoding behavior. It’s great for live tweaking and copying, making it practical for both learning and development contexts.

Useful Tools & Suggestions:

Generate Gijswijt Numbers is a solid pick if you’re into sequences that define themselves they both twist in unexpected ways. And for a quick gut check on how random or repetitive things get, run it through Find Entropy of a Number.