Produce Thue-Morse Sequence
Generate the Thue-Morse binary sequence to any length.
What Is the Thue-Morse Sequence?
Pick how many terms you want — 16, 1000, up to 100000 — and hit Generate. You'll get the binary string (0, 1, 1, 0, 1, 0, 0, 1, 1, 0...) with live counts of zeros and ones, plus a separator of your choice. And everything runs in your browser. Nothing gets uploaded.
FAQ
How is each term calculated?
Term n equals the number of 1-bits (popcount) in the binary representation of n, taken modulo 2. If the count is even, the term is 0; if odd, it's 1.
What are its applications?
The sequence is used in fair coin-tossing schemes, digital communication error detection, and constructing non-repetitive sequences.