{
  "id": "6548",
  "ident": "NS.06548",
  "slug": "oeis-4290",
  "title": "Least positive multiple of $n$ in base 10 with digits 0 and 1",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "It is known that $a(10^k - 1) = (10^{9k} - 1) / 9$ for all $k$.\nIs $a(n) < a(10^k - 1)$ for all $n < 10^k - 1$?\n- David Radcliffe, Aug 01 2025",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA4290.conjecture",
  "statement_lean": "theorem conjecture (k : ℕ) :\n    ∀ n < 10 ^ k - 1, a n < a (10 ^ k - 1)",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Least positive multiple of $n$ in base 10 with digits 0 and 1\n\nLeast positive multiple of $n$ that when written in base 10 uses only 0's and 1's.\n\n*References:*\n- [A004290](https://oeis.org/A004290)\n-/\n\n@[expose] public section\n\nnamespace OeisA4290\n\n/-- Least positive multiple of $n$ using only 0's and 1's in base 10. -/\nnoncomputable def a (n : ℕ) : ℕ :=\n  sInf { m : ℕ | 0 < m ∧ n ∣ m ∧ ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 }\n\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 0 := by\n  dsimp [a]\n  have h_empty : { m : ℕ | 0 < m ∧ 0 ∣ m ∧ ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 } = ∅ := by\n    ext m\n    simp only [Set.mem_ofPred_eq, Set.mem_empty_iff_false, iff_false, not_and]\n    intro hm h0dvd\n    have hm0 : m = 0 := Nat.eq_zero_of_zero_dvd h0dvd\n    omega\n  rw [h_empty, Nat.sInf_empty]\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by\n  dsimp [a]\n  have h_least : IsLeast { m : ℕ | 0 < m ∧ 1 ∣ m ∧ ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 } 1 := by\n    refine ⟨⟨by decide, dvd_rfl, ?_⟩, fun m hm ↦ hm.1⟩\n    intro d hd\n    rw [Nat.digits_def' (by decide) (by decide), show (1 / 10 : ℕ) = 0 by rfl,\n      Nat.digits_zero] at hd\n    simp only [show 1 % 10 = 1 by rfl, List.mem_singleton] at hd\n    subst hd\n    exact Or.inr rfl\n  exact h_least.csInf_eq\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 10 := by\n  dsimp [a]\n  have h_least : IsLeast { m : ℕ | 0 < m ∧ 2 ∣ m ∧ ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 } 10 := by\n    refine ⟨⟨by decide, by decide, ?_⟩, ?_⟩\n    · intro d hd\n      have h10 : (10 : ℕ) = 10 ^ 1 * 1 := by rfl\n      nth_rw 2 [h10] at hd\n      rw [Nat.digits_base_pow_mul (b := 10) (k := 1) (m := 1) (by decide) (by decide),\n          Nat.digits_of_lt 10 1 (by decide) (by decide)] at hd\n      simp only [List.replicate_one, List.singleton_append, List.mem_cons,\n        List.not_mem_nil, or_false] at hd\n      exact hd\n    · intro m hm\n      by_contra! hlt\n      have hm_pos : 0 < m := hm.1\n      have h2dvd : 2 ∣ m := hm.2.1\n      have hd : ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 := hm.2.2\n      interval_cases m\n      · revert h2dvd; decide\n      · have hm_d : Nat.digits 10 2 = [2] := Nat.digits_of_lt 10 2 (by decide) (by decide)\n        have h_mem : 2 ∈ Nat.digits 10 2 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 2 h_mem; omega\n      · have hm_d : Nat.digits 10 3 = [3] := Nat.digits_of_lt 10 3 (by decide) (by decide)\n        have h_mem : 3 ∈ Nat.digits 10 3 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 3 h_mem; omega\n      · have hm_d : Nat.digits 10 4 = [4] := Nat.digits_of_lt 10 4 (by decide) (by decide)\n        have h_mem : 4 ∈ Nat.digits 10 4 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 4 h_mem; omega\n      · have hm_d : Nat.digits 10 5 = [5] := Nat.digits_of_lt 10 5 (by decide) (by decide)\n        have h_mem : 5 ∈ Nat.digits 10 5 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 5 h_mem; omega\n      · have hm_d : Nat.digits 10 6 = [6] := Nat.digits_of_lt 10 6 (by decide) (by decide)\n        have h_mem : 6 ∈ Nat.digits 10 6 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 6 h_mem; omega\n      · have hm_d : Nat.digits 10 7 = [7] := Nat.digits_of_lt 10 7 (by decide) (by decide)\n        have h_mem : 7 ∈ Nat.digits 10 7 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 7 h_mem; omega\n      · have hm_d : Nat.digits 10 8 = [8] := Nat.digits_of_lt 10 8 (by decide) (by decide)\n        have h_mem : 8 ∈ Nat.digits 10 8 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 8 h_mem; omega\n      · have hm_d : Nat.digits 10 9 = [9] := Nat.digits_of_lt 10 9 (by decide) (by decide)\n        have h_mem : 9 ∈ Nat.digits 10 9 := by rw [hm_d]; exact List.Mem.head []\n        have := hd 9 h_mem; omega\n  exact h_least.csInf_eq\n\n/-- $a(10^k) = 10^k$ for all $k$. -/\n@[category textbook, AMS 11]\ntheorem a_ten_pow (k : ℕ) : a (10 ^ k) = 10 ^ k := by\n  dsimp [a]\n  have h_least : IsLeast { m : ℕ | 0 < m ∧ 10 ^ k ∣ m ∧ ∀ d ∈ Nat.digits 10 m, d = 0 ∨ d = 1 } (10 ^ k) := by\n    refine ⟨⟨Nat.pow_pos (by decide), dvd_rfl, ?_⟩, fun m hm ↦ Nat.le_of_dvd hm.1 hm.2.1⟩\n    intro d hd\n    have h10k : 10 ^ k = 10 ^ k * 1 := by rw [mul_one]\n    rw [h10k, Nat.digits_base_pow_mul (b := 10) (k := k) (m := 1) (by decide) (by decide),\n        Nat.digits_of_lt 10 1 (by decide) (by decide)] at hd\n    simp only [List.mem_append, List.mem_replicate, List.mem_singleton] at hd\n    rcases hd with ⟨-, rfl⟩ | rfl\n    · exact Or.inl rfl\n    · exact Or.inr rfl\n  exact h_least.csInf_eq\n\n/--\nIt is known that $a(10^k - 1) = (10^{9k} - 1) / 9$ for all $k$.\nIs $a(n) < a(10^k - 1)$ for all $n < 10^k - 1$?\n- David Radcliffe, Aug 01 2025\n-/\n@[category research open, AMS 11]\ntheorem conjecture (k : ℕ) :\n    ∀ n < 10 ^ k - 1, a n < a (10 ^ k - 1) := by\n  sorry\n\nend OeisA4290\n",
  "statement_hash": "d5be40fdcb253b9809e978a9c50da273928d5fa5a4387de2386b53e5bd0ebc3f",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}