EditSafely

Generate Stanley Numbers

Calculate a sequence of Stanley numbers. Runs entirely in your browser, so your data never leaves your device.

Output

The result appears here as you type.

Options

How to use Generate Stanley Numbers

  1. 1. Choose the sequence length. Set How many terms to the count of Stanley numbers you want, starting from the first term, 0.
  2. 2. Understand what gets computed. Stanley numbers are the values whose base-3 representation uses only the digits 0 and 1, forming the largest known sequence with no three-term arithmetic progression.
  3. 3. Pick a separator. Set Separator to a comma or newline so the growing terms stay readable as they climb through powers of three.
  4. 4. Copy the sequence. Copy the generated Stanley numbers into a combinatorics research note or a script exploring arithmetic-progression-free sets.

When to use Generate Stanley Numbers

Generate Stanley Numbers lists integers whose base-3 digits are only 0 or 1, a construction prized for avoiding any three-term arithmetic progression. Use this tool instead of manually converting each candidate to base 3 to check its digits.

  • Studying arithmetic-progression-free sets. A combinatorics student researching Erdos-style progression-free sequences wants the first thirty Stanley numbers to verify by hand that no three terms form an arithmetic progression.
  • Cross-checking a base-3 digit filter. A developer implementing the 0-and-1-only base-3 filter in Python wants a trusted reference sequence of twenty terms to confirm their conversion logic is correct.
  • Building a slide on greedy sequence constructions. A talk on greedy algorithms for combinatorial number theory cites the Stanley sequence as an example and needs a concrete printed list of terms for the slide deck.

Examples

The first ten Stanley numbers

Output

0, 1, 3, 4, 9, 10, 12, 13, 27, 28

About the Generate Stanley Numbers tool

Generate Stanley Numbers does its work locally, right in the browser. Calculate a sequence 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 Number Tools collection on EditSafely, a set of 194 small, focused Number 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

Does Generate Stanley Numbers 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.