Generate Thue-Morse Sequence
Calculate members of Thue-Morse number series. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use Generate Thue-Morse Sequence
- 1. Choose the sequence length. Set How many terms to the number of Thue-Morse values to compute, starting from the first term, 0.
- 2. Understand what gets computed. Each term is the parity of the count of 1-bits in its index's binary representation, producing a fair-share sequence used to avoid bias in scheduling and pattern-avoidance problems.
- 3. Pick a separator. Set Separator to a comma or space so the alternating 0 and 1 values stay easy to scan.
- 4. Copy the sequence. Copy the generated terms into a fair-division script, a research note on cube-free sequences or a classroom demonstration.
When to use Generate Thue-Morse Sequence
Generate Thue-Morse Sequence produces A010060, a sequence of 0s and 1s built from binary digit parity and famous for containing no three consecutive repeated blocks. Use this tool to get terms instantly rather than counting set bits in each index's binary form by hand.
- Building a fair-share turn-taking schedule. A board game variant wants a provably fair alternating turn order that avoids long runs favoring one side, and the Thue-Morse sequence is a well-known solution used to generate one.
- Teaching cube-free sequences in a discrete math class. A lecture on pattern avoidance in combinatorics on words uses the Thue-Morse sequence as the classic example of a sequence with no three-peat repeated block, and needs printed terms for the slide.
- Verifying a bit-parity based implementation. A developer implementing the sequence via popcount parity in C wants a trusted reference of the first thirty-two terms to confirm their bit-counting logic matches exactly.
Examples
The first eight numbers
Output
0, 1, 1, 0, 1, 0, 0, 1
About the Generate Thue-Morse Sequence tool
Generate Thue-Morse Sequence is a free online tool that works entirely inside your web browser. Calculate members of Thue-Morse number series. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 194 Number utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
You can shape the output with 2 settings, including How many terms and Separator, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.
Frequently asked questions
Does Generate Thue-Morse Sequence cost anything?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Does the generator send anything to a server?
No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.
How do I get a different result?
Run the generator again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.
Do I need to sign up or install anything?
Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.