Finitely many exceptional powers of 2 with a bounded number of ternary 1-blocks
OpenErdos406.runs_finiteLet be the set of natural numbers such that is a power of two, the ternary expansion of uses only the digits and , and this expansion has at most maximal blocks of consecutive digits equal to :
The theorem asserts that is finite for every fixed .
The finiteness is a consequence of the theory of -unit equations. If the maximal blocks of s occupy the position intervals , , then
This is an equation among powers of and , i.e. among -units for . The exponents and are pairwise distinct (distinct maximal blocks are separated by at least one ), so no nonempty proper subsum vanishes, by uniqueness of the ternary expansion. Evertse's theorem on non-degenerate solutions of -unit equations therefore gives only finitely many solutions, and each exceptional determines one of them.
Formalization Note The block count is Erdos406.oneRunCount (Nat.digits 3 n); the -unit equation is the argument of the natural language statement, not part of the Lean type.
import Mathlib import Definitions.Def_Erdos406Runs
namespace Erdos406
theorem runs_finite (R : ℕ) :
{ n : ℕ | n.isPowerOfTwo ∧ Nat.digits 3 n ⊆ [0, 1] ∧
oneRunCount (Nat.digits 3 n) ≤ R }.Finite := by
sorry
end Erdos406