All Tools
Categories
Number Tools 69 XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 45 Text Tools 13 Shipping Freight Tools 5 Calculator 4
About Contact Privacy

Baum-Sweet Numbers Generator

Generate Baum-Sweet numbers: b(n) = 1 when the binary form of n has no odd-length block of zeros, else 0: 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1... An automatic sequence with a famous generating function. Runs in your browser. Free.

Parameters
1 - 10,000
b(n) = 1 if the binary form of n has no block of zeros of odd length, else 0. Even zero blocks (00, 0000, ...) are innocent.
Sequence

          

About Baum-Sweet Numbers Generator

Scan the binary digits of n and strike out every block of consecutive zeros of odd length: the survivors are exactly the n with b(n) = 1. That one rule produces the Baum-Sweet sequence — 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, ... — one of the first "automatic" sequences ever studied, still famous for the almost-mysterious smoothness its generating function displays near the unit circle.

Baum-Sweet Numbers Generator evaluates b(n) by the run rule itself for any start index, prints each binary form together with its zero-run analysis, and keeps a live census of 1s across the block.

Features

  • Run-rule faithful: Odd-length zero blocks detected exactly, including trailing zeros.
  • Binary evidence on every row: The runs being judged are displayed next to each value.
  • Live census: The count of b(n) = 1 across the window updates as you scan.
  • Start anywhere: Any index from 0 to 1,000,000, up to 10,000 consecutive terms.
  • Reference tab: The automaton, the Baum-Sweet theorem, OEIS data and history.
  • Free and private: All computation is local; nothing is uploaded, stored or logged.

How to Use

  1. Set the start index — first n to evaluate (0 to 1,000,000).
  2. Set the count — consecutive values to generate (1 to 10,000).
  3. Generate — binary forms appear with their runs of zeros annotated.
  4. Read the census — the share of 1s changes block by block.
  5. Copy or download — the run as index = value lines.

Examples

Example 1 — Small values. Count 16: 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1. Position 4 is 1 because 100 keeps an even trailing zero block.

Example 2 — A single odd zero. n = 5 (101) holds a lone zero — odd length — so b(5) = 0.

Example 3 — Even blocks survive. n = 12 (1100) ends in two zeros, an even block, giving b(12) = 1.

Example 4 — Long zero runs. n = 8 (1000) has a block of three zeros: odd, so b(8) = 0, while its neighbor n = 16 (10000) parades four zeros and scores 1.

Example 5 — Large indices. Start 250,000, count 12: twenty-digit binary forms, each judged by its longest trailing zero run.

Benefits

  • Definition-faithful: The run rule decides every value; nothing else enters.
  • Evidence on screen: Binary and zero-run annotations explain each decision.
  • Flexible ranges: Start anywhere and examine any window up to 10,000 terms.
  • Insightful stats: The census line illuminates density behavior of the 1s.
  • Clean output: Copy or download index = value lines ready for analysis.
  • Private by design: No server, no upload, no logging.

Frequently Asked Questions

What is the Baum-Sweet sequence?
b(0) = 1, and for n > 0, b(n) = 1 exactly when the binary expansion of n contains no blocks of consecutive zeros of odd length, and 0 otherwise. The opening values are 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, ...
Why is it called automatic?
The value b(n) comes from a tiny 2-state machine that reads the binary digits of n from right to left and decides 1 or 0 — the formal definition of a 2-automatic sequence. Automatic sequences appear constantly in number theory.
Who are Baum and Sweet?
Leonard Baum and Melvin Sweet introduced the sequence in a 1976 paper proving that the real parts of the zeros of certain polynomials remain bounded but never become constant — a striking result connecting this 0/1 pattern to complex analysis.
What do the 1s look like?
The integers n with b(n) = 1 start 0, 1, 3, 4, 7, 9, 12, 15, 16, 19, ... They spiral through the integers with gaps governed by even runs of zeros; the pattern is self-similar under the substitution that replaces each 0 by 1 and each 1 by 3, 1, 0, ...
How do the runs behave?
Zeros mark exactly the integers whose binary form hides an odd-length zero block somewhere; even blocks are immune. Because every fourth integer ends in an even number of zeros, a b(n) = 1 appears in every group of four positions.
Is anything stored or uploaded?
No. Values are computed locally from the binary expansion; nothing leaves your browser, is saved or logged. Copy or download the run before closing the tab.