Badkobeh and Ochem's word b5: coding, complexity 4n + 1, and critical exponent

AI-generated · No human mathematician has yet refereed the proof.

Badkobeh and Ochem's word b5 grows from 0 by a letter-replacement rule. Lean proves it has exactly 4n + 1 blocks of each length n, and that no block is (5 + √5)/4 ≈ 1.809 or more copies of a shorter block, though some come arbitrarily close.

Let b5 be the endless word that f₅: 0 → 01, 1 → 23, 2 → 4, 3 → 21, 4 → 0 grows from 0, and φ = (1 + √5)/2. With letter weights 1 for 0, 1 + φ for 2 and −φ for 1, 3 and 4, the weight x of the opening p letters lies in (−φ²/2, φ³/2), and its piece among (−φ²/2, −1/2), (−1/2, (φ − 1)/2), ((φ − 1)/2, φ/2), (φ/2, φ) and (φ, φ³/2) names the letter at p as 2, 0, 4, 1 or 3. For every n ≥ 0, b5 has exactly 4n + 1 blocks of length n. g_fib(b5) has exactly the blocks of the Fibonacci word, n + 1 of each length n, and g_rf(b5) exactly those of the Rote-Fibonacci word, 2n of each length n ≥ 1. Every block w of b5 with period p ≥ 1 has |w|/p < (5 + √5)/4 − (7 − √5)/(8p); the critical exponent is exactly (5 + √5)/4, is never reached, is irrational, and is still the least upper bound when only periods p ≥ L count, for any L. Lean also proves that the blocks of b5, read backwards with 3 and 4 swapped, are again its blocks, that it is not balanced for any constant, that merging 1, 3 and 4 leaves 2n + 1 blocks of each length, and a five-term rule for the lengths of f₅ⁿ(w).

In 2015 Golnaz Badkobeh and Pascal Ochem introduced the five-letter word b5 and asked for proofs that it has 4n + 1 blocks of each length and critical exponent (5 + √5)/4. The result page says they also noted that two 0-1 images of it seem to have the same blocks as the Fibonacci and the Rote-Fibonacci words. Lean proves all four.

An interval-exchange coding, a five-letter factorization and a seed check give b5's 4n + 1 blocks, its two 0-1 images and its critical exponent (5 + √5)/4

Walkthrough: 4 of 4 headline questions and observations in Lean

The paper's proofs are self-contained, so nothing below is assumed. Lean proves none of these general theorems in general form, only the cases for b5 and its images that each line names.

Published inputs

  • Badkobeh & Ochem (2015) (Re-proved in Lean): Defined b5, the endless word that f₅ grows from 0, asked for proofs of (Q1) 4n + 1 blocks of each length and (Q2) critical exponent (5 + √5)/4, observed (O1, O2) that two 0-1 images appear to have the blocks of the Fibonacci and Rote–Fibonacci words, and showed that a block of b5 read backwards with 3 and 4 swapped is again a block; Lean proves that symmetry of b5 again, in both directions.
  • Arnoux & Rauzy (1991); Santini-Bouchard (1997); Adamczewski (2002) (Re-proved in Lean): State or prove that codings of an exchange of three intervals (a map that cuts a line segment into three pieces and rearranges them) have 2n + 1 blocks of each length, each under its own condition on the exchange; Lean proves this count only for π₃(b5), for every n ≥ 0.
  • Arnoux, Berthé, Masáková & Pelantová (2008); Lenz, Masáková & Pelantová (2011) (Re-proved in Lean): Show that the σ₀₁-image of an aperiodic three-interval-exchange word is Sturmian (Lenz, Masáková and Pelantová restate it), and Arnoux, Berthé, Masáková and Pelantová bound such words by at most 2n + 1 blocks by counting preimages of cut points. Lean uses their σ₀₁ to write g_fib = σ₀₁ ∘ π₃, proves the preimage count as an exact count for a word coded by a dense orbit of a piecewise translation whose pieces carry pairwise different letters, and proves the Sturmian conclusion only for g_fib(b5).
  • Morse & Hedlund (1940); Berstel & Séébold (2002) (not fully read); Berthé (2009, read as the 2006 preprint) (Re-proved in Lean): Prove that Sturmian words (0-1 words read off a circle turned by an irrational step) of one slope have the same blocks, and that such words have n + 1 blocks of each length (Berstel and Séébold for the Fibonacci word, and Berthé). Lean proves these only for g_fib(b5) and the Fibonacci word.
  • Du, Mousavi, Schaeffer & Shallit (2014) (Re-proved in Lean): Defined the Rote–Fibonacci word r as the output of a two-state transducer reading the Fibonacci word; the paper follows that definition, and Lean proves the transducer output equals r's bit-by-bit rule at every position.
  • Rote (1994); Du, Mousavi, Rowland, Schaeffer & Shallit (2017) (Re-proved in Lean): Rote proved that a 0-1 sequence closed under swapping 0 and 1 has 2n blocks of each length n ≥ 1 exactly when its differences mod 2 form an irrational Sturmian sequence; Du, Mousavi, Rowland, Schaeffer and Shallit derive from it that r has 2n blocks of each length n ≥ 1. The credit is limited to that count, and Lean proves only that count for r, not Rote's theorem.
  • Doucet (1973); Ruohonen (1975) (Re-proved in Lean): Prove that the word lengths of a D0L system (words grown by one letter-replacement rule) satisfy the linear recurrence given by the characteristic polynomial of its growth matrix; Lean proves only the case of f₅, the fifth-order rule, for every starting word.

What this paper adds

  • Interval-exchange coding, counts & symmetry: Every position of b5 is a point on a line; Exactly 4n + 1 blocks of each length; Blocks read backwards with 3 and 4 swapped; Letter counts are not balanced
  • Merged letters and two 0-1 images: Merging 1, 3 and 4 leaves 2n + 1 blocks; g_fib(b5) has the blocks of the Fibonacci word; g_rf(b5) has the blocks of the Rote–Fibonacci word; After a leading 0, g_rf(b5) is r flipped, bit by bit
  • Critical exponent (5 + √5)/4: No block reaches (5 + √5)/4 copies of a period; E(b5) = (5 + √5)/4, never reached; A sharp second-order bound; Irrational, and the same for long periods

b5 has 4n + 1 blocks of each length and critical exponent (5 + √5)/4

For every n ≥ 0, b5 has exactly 4n + 1 blocks of length n; its critical exponent is (5 + √5)/4 and is never reached; and its images g_fib(b5) and g_rf(b5) have exactly the blocks of the Fibonacci and the Rote–Fibonacci words. These answer Badkobeh and Ochem's two questions and two observations.

4 of 4 headline questions and observations proved in Lean with no outside assumption; the seed check runs inside the Lean kernel.

Listed as open in the paper

  • Can E(b5) = (5 + √5)/4 be proved directly from near-returns of the interval exchange, without the 338-seed case split?
  • Can one prove rigorously that the Zeckendorf F-kernel of b5 is infinite?
  • Formalizing Badkobeh and Ochem's converse, that every infinite word avoiding squares and the 16 blocks of their set F₅ has the same blocks as b5, remains an open formalization target.
  • What are the exact block counts and critical exponents of the binary and ternary morphic images of b5 studied by Badkobeh and Ochem?

Adjacent prior work (not used as inputs)

  • Adamczewski (2003)
  • Mignosi & Pirillo (1992)
  • Rampersad, Shallit & Vandomme (2019)
  • Schaeffer & Shallit (2012)
  • Ochem & Rosenfeld (2017); Ochem & Rosenfeld (2021); Badkobeh & Ochem (2026)

Building b5 from the letter 0

Apply f₅ to 0 again and again: 0, 01, 0123, 0123421, 01234210423, 01234210423010421. Each word begins the next, so b5 = 01234210423010421… . Its blocks of length 1 are the 5 letters, and of length 2 there are 9 = 4·2 + 1: 01, 04, 10, 12, 21, 23, 30, 34 and 42. The block 23010421012301042 has 17 letters and period 10, since 2301042 comes back after 10 letters; it is 17/10 = 1.7 copies of 2301042101, below 1.809. On the line, the opening weights 0, 1, 1 − φ ≈ −0.618, 2, 2 − φ ≈ 0.382 fall in the pieces of 0, 1, 2, 3 and 4, matching 01234.

The interactive page explains each key step in full.

The word b5 and its blocks

The rule f₅ sends 0 → 01, 1 → 23, 2 → 4, 3 → 21 and 4 → 0. Starting from 0 and applying it again and again only adds letters at the end, which gives the endless word b5 = 0123421042301042101… . A block is a run of neighbouring letters, and a block w has period p when every letter equals the letter p places later; the critical exponent is the least number at or above every ratio |w|/p.

  • The golden ratio φ, in the library
  • The opening n letters, in the library
  • Apply a letter rule to a word, in the library
  • Apply a letter rule n times, in the library
  • Apply a letter rule to an endless word
  • The rule f₅, in the library
  • The word b5, in the library
  • The blocks of length n, in the library
  • How many blocks of length n, in the library
  • Every word has one block of length 0

Every position is a point on a line

Give the letters weights: 1 for 0, φ² for 2 and −φ for 1, 3 and 4. The weight of the opening p letters is a point x in the interval from −φ²/2 to φ³/2, and the piece x falls in names the letter at p. Adding the next weight moves x by φ², 1 or −φ, which slides three parts of the interval past each other, so b5 is what this exchange reads from 0. The points come as close as you like to every point of the interval.

  • b5 is the exchange read from 0
  • The weight of a word, in the library
  • x is in the piece of letter a, in the library
  • The exchange of three pieces, in the library
  • The letter of a point
  • The exchange backwards
  • The four inner cut points
  • The set of four cut points

Exactly 4n + 1 blocks of each length

A block of length n is what n exchange steps read from some point. The break points, those that reach one of the four cut points within n − 1 steps, are exactly 4n; points with no break point between them read the same block, and the 4n + 1 pieces between break points read 4n + 1 different blocks. Every piece is visited, so b5 has exactly 4n + 1 blocks of length n, and with only two cut points the same count gives 2n + 1 for the word with three letters merged.

  • Count the blocks by counting pieces
  • The count for n ≥ 1
  • Merge three letters, in the library
  • From three letters to two, in the library
  • The merged word, in the library
  • Exactly 2n + 1 blocks of the merged word, in the library

Two 0-1 shadows of b5

g_fib turns b5 into a 0-1 word. Lean shows it is read by a turn of a circle from 0, while the Fibonacci word is read by the same turn from 1/2, so the two have the same blocks, n + 1 of each length. For g_rf, Lean shows that its agreement bits, 1 where two neighbouring bits are equal, spell the Fibonacci word, so g_rf(b5) has the blocks of the Rote-Fibonacci word, 2n of each length n ≥ 1.

  • One turn, two words
  • The Fibonacci word, in the library
  • The map g_fib, in the library
  • The word g_fib(b5), in the library
  • n + 1 blocks of g_fib(b5)
  • The word g_rf(b5), in the library
  • The Rote-Fibonacci word, in the library
  • The machine run on the Fibonacci word, in the library
  • 2n blocks of g_rf(b5)
  • One empty block of g_rf(b5)

336 seed summaries, checked by machine

A repetition that cannot grow has a period p and an overlap m, and its exponent is below 1 + φ/2 exactly when its gap φp − 2m is positive. Applying f₅ to it gives a longer one, and Lean undoes this until the overlap is 1 or 2. Seeds with period at most 40 are among 336 summaries in a table; for each, a program Lean runs follows 26 steps of f₅, and Lean proves that passing it keeps the gap positive for ever, while seeds with longer periods are handled by a growth estimate.

Never (5 + √5)/4 copies, but ever closer

Every block w with period p ≥ 1 and |w| > p sits, far enough out, inside a repetition that cannot grow, so |w|/p < (5 + √5)/4. Following the seed 010 inside 123010421, the period grows while the gap stays at most 4, so the ratios come as close to (5 + √5)/4 as you like. A sharper check of the same seeds gives |w|/p < (5 + √5)/4 − (7 − √5)/(8p) for every block w with a period p ≥ 1.

  • No exponent reaches (5 + √5)/4
  • The critical exponent is (5 + √5)/4
  • The same, for nonempty blocks
  • No block has exponent (5 + √5)/4
  • The Fibonacci numbers, in the library

Symmetry, imbalance and the challenge statements

A mirror of the interval shows that the blocks of b5, read backwards with 3 and 4 swapped, are again its blocks. A weight that flips sign under f₅ shows that letter counts in blocks of equal length can differ by any amount, and the letter-count table of f₅ gives a five-term rule for lengths. The challenge file restates the definitions and 23 theorems, among them that b5 avoids the 16 forbidden blocks and every odd-cycle pattern, and each is proved from the library.

  • Each letter is read off from a point, as stated

    For every position p, the weight x of the opening p letters of b5 lies strictly between −φ²/2 and φ³/2, and the letter at p is 2, 0, 4, 1 or 3 exactly when x lies in (−φ²/2, −1/2), (−1/2, (φ − 1)/2), ((φ − 1)/2, φ/2), (φ/2, φ) or (φ, φ³/2).

  • Exactly 4n + 1 blocks of length n, as stated

    For every n ≥ 0, b5 has exactly 4n + 1 different blocks of length n.

  • g_fib(b5) has the Fibonacci blocks

    For every n, g_fib(b5) has the same blocks of length n as the Fibonacci word, and n + 1 of them.

  • g_rf(b5) has the Rote-Fibonacci blocks, 2n of each length n ≥ 1

    For every n, g_rf(b5) has the same blocks of length n as the Rote-Fibonacci word, and for n ≥ 1 it has 2n of them.

  • The critical exponent is (5 + √5)/4, never reached

    The critical exponent of b5 is (5 + √5)/4, and no block w of b5 with a period p ≥ 1 has |w|/p = (5 + √5)/4.

  • The sharper bound and its limit

    Over blocks w of b5 with a period p ≥ 1, the gaps φp − 2(|w| − p) get down to (7 − √5)/4 and never reach it, and every such block has |w|/p < (5 + √5)/4 − (7 − √5)/(8p).

  • Long periods, and irrational

    For every L, the exponents with period at least L come as close to (5 + √5)/4 as you like and never above, and the critical exponent of b5 is irrational.

  • Backwards with 3 and 4 swapped, b5 has the same blocks, as stated

    For every finite word w, w is a block of b5 exactly when w written backwards with 3 and 4 swapped is a block of b5.

  • Exactly 2n + 1 blocks of the merged word

    For every n, the merged word has exactly 2n + 1 blocks of length n.

  • b5 is not balanced, as stated

    For every C, there are two blocks of b5 of the same length and a letter whose counts in them differ by more than C.

  • The lengths follow a five-term rule, as stated

    For every word w and every k, with L(j) the length of f₅ applied j times to w, L(k + 5) + L(k + 2) = L(k + 4) + L(k + 3) + L(k + 1) + L(k).

  • One exchange step takes each position's point to the next

    For every x strictly between −φ²/2 and φ³/2 other than −1/2 and (φ − 1)/2, one exchange step from x stays strictly between −φ²/2 and φ³/2. And for every position p, the weight x of the opening p letters of b5 is neither −1/2 nor (φ − 1)/2, and one exchange step from x gives the weight of the opening p + 1 letters.

  • Opposite signs in u v u, and a colouring by sign

    If u and v are nonempty and u v u is a block of b5, then λ′(u) and λ′(v) are nonzero with opposite signs, and |λ′(uv)| < |λ′(u)|. And colouring each word by whether its weight is above 0 gives different colours to any two words that alternate in b5.

  • b5 avoids the pattern of every graph with an odd cycle, as stated

    For every directed graph without loops that has an odd cycle, with arrows taken either way, no choice of a nonempty word h(v) for each vertex v makes h(u) h(v) h(u) a block of b5 for every arrow u → v.

  • b5 avoids the 3-cycle, transitive-tournament and all-arrows patterns for n ≥ 3

    No nonempty words X₀, X₁, X₂ make X₀X₁X₀, X₁X₂X₁ and X₂X₀X₂ all blocks of b5. And for every n ≥ 3, no nonempty words Xᵢ, i < n, make XᵢXⱼXᵢ a block of b5 for all i < j, nor for all i ≠ j.

  • g_fib through the merged word, and n + 1 Fibonacci blocks

    For every word w, g_fib(w) is the rule 0 → 0, 1 → 01, 2 → 1 applied to w after the merge (1, 3 and 4 become 0, 0 becomes 1, 2 stays 2). For every k, bit k of g_fib(b5) is bit k of that rule applied to the opening k + 1 letters of the merged word. And for every n, the Fibonacci word has exactly n + 1 blocks of length n.

  • The machine writes r, and g_rf(b5) is 0 then r flipped

    For every k, bit k of what the two-state machine writes from state 0 on the Fibonacci word is bit k of the Rote-Fibonacci word r. g_rf(b5) starts with 0 and, for every k, its bit k + 1 is the other bit from r(k). For every k, bits k and k + 1 of g_rf(b5) are equal exactly when letter k of the Fibonacci word is 1, and r(k) and r(k + 1) are equal exactly when letter k + 1 of the Fibonacci word is 1.

  • Flipping every bit keeps the blocks, and r has 2n of each length n ≥ 1

    A 0-1 word w is a block of g_rf(b5) exactly when w with every bit flipped is, and the same holds for the Rote-Fibonacci word r. For every n ≥ 1, r has exactly 2n blocks of length n, and g_rf(b5) has exactly 1 block of length 0.

  • Every gap is above (7 − √5)/4, and no block is a nonempty word written twice

    (7 − √5)/4 = 2 − φ/2. For every block w of b5 and every period p ≥ 1 of w, the gap φp − 2(|w| − p) is above (7 − √5)/4. And for every nonempty word u, u followed by u is not a block of b5.

  • Shifted gaps in Fibonacci numbers, and blocks near the sharper bound

    For every j, some nonempty block w of b5 has a period p ≥ 1 with p ≥ φ⁶⁺⁶ʲ and 2(φp − 2(|w| − p)) − (4 − φ) = −F(12 + 6j) + F(11 + 6j)·φ = 1/φ¹¹⁺⁶ʲ > 0, with F the Fibonacci numbers. For every ε > 0 and every P₀, some nonempty block w of b5 has a period p ≥ 1 with p ≥ P₀, gap φp − 2(|w| − p) < (7 − √5)/4 + ε, and |w|/p > (5 + √5)/4 − (7 − √5 + ε)/(8p). For every L, the least number at or above every exponent of a block of b5 with at least L letters is (5 + √5)/4. And (5 + √5)/4 = 1 + φ/2.

  • A step then the mirror sends each piece onto its swapped piece

    If x is in the piece of letter a, the mirror S(y) = φ/2 − y of the exchange step from x lies in the piece of a with 3 and 4 swapped, and one step from that point lands on the mirror of x. And the points of the piece of a with 3 and 4 swapped are exactly the mirrors of the steps from points of the piece of a.

  • b5 avoids the 16 forbidden blocks, a set kept by reverse and swap

    Writing any of Badkobeh and Ochem's 16 forbidden blocks backwards with 3 and 4 swapped gives one of the 16 again, and none of the 16 is a block of b5.

  • The sequence's four-term rule, and the lengths from 0, as stated

    With a the sequence 1, 1, 1, 1, 2, 4, 7, … as the challenge states it: for every n, a(n + 4) + a(n + 2) = 2a(n + 3) + a(n); and for every k, f₅ applied k times to the word 0 has a(k + 3) letters.

  • The mirror of the line
  • Colour a word by its sign
  • The golden ratio φ
  • The opening n letters
  • A block, as stated
  • Apply a letter rule to a word
  • Apply a letter rule n times
  • The rule f₅
  • The word b5
  • The weight of a word
  • The blocks of length n
  • How many blocks of length n
  • The Fibonacci word
  • The map g_fib
  • The word g_fib(b5)
  • The word g_rf(b5)
  • The Rote-Fibonacci word
  • A period, as stated
  • The critical exponent, as stated
  • All gaps, as stated
  • Exponents with long periods, as stated
  • Swap 3 and 4
  • Reverse and swap
  • Merge three letters
  • The merged word
  • The exchange of three pieces
  • x is in the piece of letter a
  • A directed graph without loops, as stated
  • A word avoids a graph's pattern, as stated
  • An odd cycle, as stated
  • Two words that alternate in b5
  • The 3-cycle, as stated
  • The transitive tournament on k vertices, as stated
  • All arrows on n vertices, as stated
  • The same graph in the library's terms
  • From three letters to two
  • The two-letter rule on the merged word, as stated
  • The machine run on the Fibonacci word
  • The Fibonacci numbers
  • Exponents of long blocks, as stated
Short

Watch on YouTube ↗