{
  "id": "5608",
  "ident": "NS.05608",
  "slug": "oeis-232616",
  "title": "Least $m > 0$ such that $\\{2^k - k : k = 1, \\dots, m\\}$ covers all residues modulo $n$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Conjecture (i): $a(n) < 2 \\cdot (\\text{prime}(n) - 1)$ for all $n > 0$,\nwhere $\\text{prime}(n)$ is the $n$-th prime number (1-indexed).\n\nDisproved for $n = 550172$ in the OEIS Open project, see T. Adamczewski, OEIS Open: How many\nconjectures can language models turn into theorems?,\n[arXiv:2608.11941](https://arxiv.org/abs/2608.11941).",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA232616.conjecture_1",
  "statement_lean": "theorem conjecture_1 : ¬ ∀ n > 0, a n < 2 * (Nat.nth Nat.Prime (n - 1) - 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 $m > 0$ such that $\\{2^k - k : k = 1, \\dots, m\\}$ covers all residues modulo $n$\n\nFor $n \\ge 1$, $a(n)$ is the least positive integer $m$ such that $\\{2^k - k : k = 1, \\dots, m\\}$\ncontains a complete system of residues modulo $n$.\n\n*References:*\n- [A232616](https://oeis.org/A232616)\n- T. Adamczewski, \"OEIS Open: How many conjectures can language models turn into theorems?\",\n  [arXiv:2608.11941](https://arxiv.org/abs/2608.11941) [cs.AI], 2026.\n-/\n\n@[expose] public section\n\nnamespace OeisA232616\n\n/--\nThe predicate that $\\{2^k - k : k = 1, \\dots, m\\}$ contains a complete system\nof residues modulo $n$.\n-/\ndef HasCompleteResidueSystem (n m : ℕ) [NeZero n] : Prop :=\n  (Finset.univ : Finset (ZMod n)) =\n    (Finset.Icc 1 m).image fun k ↦ (Nat.cast (2 ^ k - k) : ZMod n)\n\ninstance (n m : ℕ) [NeZero n] : Decidable (HasCompleteResidueSystem n m) :=\n  decEq _ _\n\n/--\nLeast positive integer $m$ such that $\\{2^k - k : k = 1, \\dots, m\\}$\ncontains a complete system of residues modulo $n$.\n-/\nnoncomputable def a (n : ℕ) : ℕ :=\n  if h : n = 0 then 0\n  else\n    have : NeZero n := NeZero.mk h\n    sInf { m : ℕ | HasCompleteResidueSystem n m }\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by\n  rw [a, dif_neg (by decide)]\n  exact IsLeast.csInf_eq (by decide)\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 2 := by\n  rw [a, dif_neg (by decide)]\n  exact IsLeast.csInf_eq (by decide)\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 4 := by\n  rw [a, dif_neg (by decide)]\n  exact IsLeast.csInf_eq (by decide)\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 5 := by\n  rw [a, dif_neg (by decide)]\n  exact IsLeast.csInf_eq (by decide)\n\n@[category test, AMS 11]\ntheorem a_5 : a 5 = 10 := by\n  rw [a, dif_neg (by decide)]\n  exact IsLeast.csInf_eq (by decide)\n\n/--\nConjecture (i): $a(n) < 2 \\cdot (\\text{prime}(n) - 1)$ for all $n > 0$,\nwhere $\\text{prime}(n)$ is the $n$-th prime number (1-indexed).\n\nDisproved for $n = 550172$ in the OEIS Open project, see T. Adamczewski, OEIS Open: How many\nconjectures can language models turn into theorems?,\n[arXiv:2608.11941](https://arxiv.org/abs/2608.11941).\n-/\n@[category research solved, AMS 11]\ntheorem conjecture_1 : ¬ ∀ n > 0, a n < 2 * (Nat.nth Nat.Prime (n - 1) - 1) := by\n  sorry\n\n/--\nConjecture (ii), first equation: The Diophantine equation $x^n - n = y^m$ with $m, n, x, y > 1$\nonly has two integral solutions: $2^5 - 5 = 3^3$ and $2^7 - 7 = 11^2$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_2 (x y n m : ℕ) (hx : 1 < x) (hy : 1 < y) (hn : 1 < n) (hm : 1 < m) :\n    x ^ n - n = y ^ m ↔ (x = 2 ∧ n = 5 ∧ y = 3 ∧ m = 3) ∨ (x = 2 ∧ n = 7 ∧ y = 11 ∧ m = 2) := by\n  sorry\n\n/--\nConjecture (ii), second equation: The Diophantine equation $x^n + n = y^m$ with $m, n, x, y > 1$\nonly has two integral solutions: $5^2 + 2 = 3^3$ and $5^3 + 3 = 2^7$.\n-/\n@[category research open, AMS 11]\ntheorem conjecture_3 (x y n m : ℕ) (hx : 1 < x) (hy : 1 < y) (hn : 1 < n) (hm : 1 < m) :\n    x ^ n + n = y ^ m ↔ (x = 5 ∧ n = 2 ∧ y = 3 ∧ m = 3) ∨ (x = 5 ∧ n = 3 ∧ y = 2 ∧ m = 7) := by\n  sorry\n\nend OeisA232616\n",
  "statement_hash": "353c9f43a0671ec58eb2898dcc4664c3340fe57036f4cb87dd1243d770a24cba",
  "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."
}