Lefebvre's variations, No. 65 — on a theme by Erdős: the only powers of two up to 2^100000 with no digit 2 in base 3 are 1, 4 and 256
ProvedLefebvreVariations.erdos_406_of_le_pow_100000Every power of two whose base-3 expansion uses only the digits and is one of , or :
Here , and . Erdős conjectured that these three are the only powers of two with no digit in base (Erdős problem 406); the parent problem asks for the finiteness of this set. The statement settles the conjecture up to the exponent .
Formalization Note. The set is written with the parent's own predicates, n.isPowerOfTwo and Nat.digits 3 n ⊆ [0, 1], with the added bound n ≤ 2 ^ 100000. The digit list Nat.digits 3 n is little-endian, and Nat.digits 3 1 = [1], so n = 1 is included (the exponent ). The right-hand side is the three-element set {1, 4, 256}.
Why this is a variation. Variation on the open Erdos406.erdos_406 (the only powers of two with no digit 2 in base 3 are 1, 4 and 256). It is a finite partial result: the conjecture verified for all powers of two up to 2^100000, which extends the known examples and rules out small counterexamples.
Attribution. This statement belongs to Lefebvre's variations, a series proposed by Erwan Lefebvre: each variation plays an open problem of the platform at its first non-trivial size, so that it can be settled and then reused to attack the open problem itself.
import Mathlib set_option autoImplicit false
namespace LefebvreVariations
/-- **Erdős problem 406 up to `2 ^ 100000`**: the powers of two `≤ 2 ^ 100000` whose base-3 digits
are all `0` or `1` are exactly `1`, `4 = 11₃` and `256 = 100111₃`, by finite computation. That
there are no others is Erdős' conjecture (problem 406 on erdosproblems.com); see also Lagarias,
*Ternary expansions of powers of 2*, J. London Math. Soc. (2) 79 (2009) (cited from memory). -/
theorem erdos_406_of_le_pow_100000 :
{ n : ℕ | n.isPowerOfTwo ∧ n ≤ 2 ^ 100000 ∧ Nat.digits 3 n ⊆ [0, 1] } = {1, 4, 256} := by
sorry
end LefebvreVariations