This tool lets you generate any number of Thue-Morse terms and see the output live. The sequence is built by calculating the parity of 1s in the binary form of each index. If the count of 1s is even, the value is 0. If odd, it’s 1. You control the layout and whether to show index numbers.
All changes update instantly, and a flashing output box confirms each change. You can also copy the result or export it to a file.
How to Use:
- Enter how many Thue-Morse values you want.
- Flip the toggles to control:
- Whether the output appears line-by-line or inline.
- Whether index numbers are displayed next to each value.
- The output will refresh live as you change anything.
- Use “Copy Output” to copy or “Export to File” to save it.
- Click “Clear All” to reset inputs and output.
What Generate Thue-Morse Sequence can do:
Thue-Morse is a binary sequence defined by the parity of the 1s in each number’s binary representation. This tool handles all the logic and formatting for you. You just type a number and get a list of 0s and 1s representing the sequence.
Options let you switch how it displays and whether to show positions alongside values. The result flashes on every update and includes a counter for total items.
Example:
Input:
6
Settings: Line-by-line: ON, Show index: OFF
Output:
0
1
1
0
1
0
0
1
1
0
0
1
0
1
1
0
Thue-Morse Sequence Table:
This table shows the first 10 terms of the Thue-Morse sequence, which is generated by checking the number of 1s in the binary representation of each index. It’s useful for understanding binary parity patterns, automata, or exploring complexity in simple rules.
Index (n) | Binary of n | Thue-Morse Value |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
2 | 10 | 1 |
3 | 11 | 0 |
4 | 100 | 1 |
5 | 101 | 0 |
6 | 110 | 0 |
7 | 111 | 1 |
8 | 1000 | 1 |
9 | 1001 | 0 |
Common Use Cases:
Use this for teaching about parity, binary operations, and recursive patterns. The Thue-Morse sequence is useful in theoretical math, automata, and combinatorics. Developers and educators can use it to explain how data changes based on binary content or to generate patterns for testing algorithms.
Useful Tools & Suggestions:
If you’re into sequences like this, check out Generate Look-and-Say Sequence it’s another weird but fascinating pattern that evolves in its own way. You could also try Find Entropy of a Number to see how much order or randomness is packed into what you generate.