Generate Moser-de Bruijn Sequence
Generate the Moser-de Bruijn sequence — numbers whose base-4 representation contains only digits 0 and 1: 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, ...
Options
Output (Moser-de Bruijn Sequence)
What It Does
Generate the Moser-de Bruijn sequence — numbers whose base-4 representation contains only digits 0 and 1: 0, 1, 4, 5, 16, 17, 20, 21, 64, 65, ...
How It Works
Generate Moser-de Bruijn Sequence produces new output from rules, parameters, or patterns instead of editing an existing document. That makes input settings more important than input text, because the settings are what define the shape of the result.
Generators are only as useful as the settings behind them. When the output seems off, check the count, range, delimiter, seed values, or pattern options before judging the result itself.
All processing happens in your browser, so your input stays on your device during the transformation.
Common Use Cases
- Study sums of distinct powers of 4
- Research sequence properties in base-4 representations
- Explore connections to fractal geometry
- Generate reference data for number theory
- Educational materials on base-specific sequences
How to Use
- Specify count.
- Click Generate.
- View sequence with base-4 representations.
- Copy.
Features
- Generates Moser-de Bruijn sequence terms
- Shows base-4 representations
- Displays as sums of powers of 4
- Large sequence support
- Mathematical properties
Examples
Below is a representative input and output so you can see the transformation clearly.
n: 10
0 1 2 4 5 8 9 10 16 17
Edge Cases
- Very large inputs can still stress the browser, especially when the tool is working across many numbers. Split huge jobs into smaller batches if the page becomes sluggish.
- Empty or whitespace-only input is technically valid but may produce unchanged output, which can look like a failure at first glance.
- If the output looks wrong, compare the exact input and option values first, because Generate Moser-de Bruijn Sequence should be repeatable with the same settings.
Troubleshooting
- Unexpected output often means the input is being split or interpreted at the wrong unit. For Generate Moser-de Bruijn Sequence, that unit is usually numbers.
- If a previous run looked different, check for hidden whitespace, changed separators, or a setting that was toggled accidentally.
- If nothing changes, confirm that the input actually contains the pattern or structure this tool operates on.
- If the page feels slow, reduce the input size and test a smaller sample first.
Tips
Every non-negative integer can be uniquely represented as the sum of two Moser-de Bruijn numbers.
Frequently Asked Questions
What are the first terms?
0, 1, 4, 5, 16, 17, 20, 21, 64, 65, 68, 69, 80, 81, 84, 85.
Why base 4?
The sequence is defined by sums of distinct powers of 4, which is equivalent to base-4 representations using only 0 and 1.
What is the sumset property?
Every non-negative integer equals exactly one sum of two (not necessarily distinct) Moser-de Bruijn numbers.
How fast does the sequence grow?
Roughly like √n — the nth term is approximately 4^(log₂ n).
Is it related to fractals?
Yes. The sequence is connected to the Cantor set and similar fractal constructions in base 4.
Who discovered it?
Leo Moser and Nicolaas Govert de Bruijn studied its properties.