Generate Stanley Number Sequence
Create a list of Stanley numbers. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use Generate Stanley Number Sequence
- 1. Set how many terms. Enter How many terms to decide how many Stanley numbers to list, values whose base-3 representation uses only the digits 0 and 1, giving a sequence with no three-term arithmetic progression.
- 2. Set a separator. Choose Separator, a comma or newline, to shape the output for a plain list or spreadsheet column.
- 3. Copy the results. The tool filters numbers to those whose base-3 digits avoid the digit 2 entirely. Copy the resulting Stanley numbers for your combinatorics or number theory reference.
When to use Generate Stanley Number Sequence
Generate Stanley Number Sequence lists integers whose base-3 representation contains only 0s and 1s, producing a sequence famous for containing no three-term arithmetic progression. Reach for it whenever you need this specific sequence without converting numbers to base 3 and checking digits by hand.
- Studying arithmetic-progression-free sequences. A combinatorics student exploring sequences that deliberately avoid arithmetic progressions references the Stanley sequence as the classic example built from restricted base-3 digits.
- Testing a base-3 digit filter. A developer who wrote a function to filter numbers whose base-3 expansion excludes the digit 2 validates its output against this generated sequence to catch a base-conversion error.
- Comparing against the Moser-de Bruijn sequence. Someone studying how restricting digits in different bases produces structurally similar sequences compares Stanley numbers, built from base-3 digit restrictions, against Moser-de Bruijn numbers built from base 4.
- Preparing an additive combinatorics example. An instructor covering additive combinatorics and progression-free sets uses the Stanley sequence as a concrete, easily verified example before introducing more advanced constructions.
Examples
The first ten Stanley numbers
Output
0, 1, 3, 4, 9, 10, 12, 13, 27, 28
About the Generate Stanley Number Sequence tool
Generate Stanley Number Sequence does its work locally, right in the browser. Create a list of Stanley numbers. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the Math Tools collection on EditSafely, a set of 234 small, focused Math utilities that share the same instant, private workspace.
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.
Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is Generate Stanley Number Sequence free to use?
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?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
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?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
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.