Generate Prouhet-Thue-Morse Sequence
Create Prouhet-Thue-Morse values. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use Generate Prouhet-Thue-Morse Sequence
- 1. Set how many terms. Enter How many terms to decide how far into the Prouhet-Thue-Morse sequence to compute, where each term is the parity of the number of 1s in that index's binary form.
- 2. Set a separator. Choose Separator, a comma or newline, to match how you plan to read or paste the resulting 0s and 1s.
- 3. Copy the sequence. The tool counts the 1 bits in each index's binary representation and outputs a parity bit. Copy the resulting sequence for your automatic sequence study or code test.
When to use Generate Prouhet-Thue-Morse Sequence
Generate Prouhet-Thue-Morse Sequence produces the classic binary sequence built from the parity of 1 bits in each index, famous for avoiding cubes in its pattern and for solving the fair-division Prouhet problem. Use it whenever you need verified terms without computing bit parities by hand.
- Studying cube-free sequences. A student learning about combinatorics on words wants to see the Thue-Morse sequence's property of never repeating any block three times in a row, and checks this against generated terms.
- Solving the fair division Prouhet problem. Someone studying how to split a set of numbers into groups with equal power sums references the Thue-Morse sequence, which provides the classic solution method, and needs the terms laid out.
- Testing a bit-parity implementation. A developer who wrote a function to compute the parity of set bits in an index validates the resulting sequence against this tool's output to confirm the parity logic is correct.
- Cross-referencing OEIS A010060. Someone checking their derivation against the published sequence regenerates the early terms here to confirm the values line up exactly with the reference source.
Examples
The first eight terms
Output
0, 1, 1, 0, 1, 0, 0, 1
About the Generate Prouhet-Thue-Morse Sequence tool
Generate Prouhet-Thue-Morse Sequence runs as plain JavaScript in your browser tab, with no server behind it. Create Prouhet-Thue-Morse values. Whatever you put in stays on your device from start to finish.
The tool is part of EditSafely's Math Tools section, 234 single-purpose utilities built around the same idea: open the page, get the result, keep your data to yourself.
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.
That local-first design has practical benefits beyond privacy. The tool keeps working on a flaky connection once the page has loaded, results are instant because nothing round-trips to a server, and it is safe to use with confidential material.
Frequently asked questions
Does Generate Prouhet-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.