{
  "id": "5190",
  "ident": "NS.05190",
  "slug": "oeis-194806",
  "title": "Size of smallest subset of $\\{1, 2, \\dots, n\\}$ with distinct subset sums",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Is $a(n) / \\pi(n)$ bounded as $n \\to \\infty$? - _Robert Israel_, Jan 09 2017\n\nA formal proof has been found with the methods described in\n[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA194806.a_div_prime_counting_bounded",
  "statement_lean": "theorem a_div_prime_counting_bounded : ∃ C : ℝ,\n    ∀ n : ℕ, 2 ≤ n → (a n : ℝ) / (Nat.primeCounting n : ℝ) ≤ C",
  "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# Size of smallest subset of $\\{1, 2, \\dots, n\\}$ with distinct subset sums\n\nSize of the smallest subset $S$ of $T = \\{1,2,3,\\dots,n\\}$\nsuch that $S \\cdot S$ contains $T$,\nwhere $S \\cdot S$ is the set of all products of elements of $S$.\n\n*References:*\n- [A194806](https://oeis.org/A194806)\n- [arxiv/2605.22763](https://arxiv.org/abs/2605.22763) *Advancing Mathematics Research with AI-Driven Formal Proof Search* by George Tsoukalas et al.\n-/\n\n@[expose] public section\n\nnamespace OeisA194806\n\n\nopen Finset Nat\n\n/-- The set of all products of elements from a Finset S. -/\ndef setProd (S : Finset ℕ) : Finset ℕ :=\n  (S.product S).image fun p : ℕ × ℕ => p.fst * p.snd\n\n/--\nSize of the smallest subset $S$ of $T = \\{1,2,3,\\dots,n\\}$\nsuch that $S \\cdot S$ contains $T$,\nwhere $S \\cdot S$ is the set of all products of elements of $S$.\n-/\ndef a (n : ℕ) : ℕ :=\n  if h : n = 0 then 0\n  else\n    let T_n := Icc 1 n\n\n    -- The set of subsets $S \\subseteq T_n$ such that $T_n \\subseteq S \\cdot S$.\n    let valid_subsets : Finset (Finset ℕ) :=\n      T_n.powerset.filter (fun S : Finset ℕ => T_n ⊆ setProd S)\n\n    -- Proof that $T_n$ is guaranteed to be a valid subset, ensuring `valid_subsets` is non-empty.\n    have T_n_is_valid : T_n ∈ valid_subsets := by\n      apply mem_filter.mpr\n      constructor\n      -- 1. T_n ∈ T_n.powerset (i.e., T_n ⊆ T_n)\n      apply mem_powerset.mpr; rfl\n      -- 2. T_n ⊆ setProd T_n\n      intro k hk\n\n      have one_le_n : 1 ≤ n := Nat.succ_le_of_lt (Nat.pos_of_ne_zero h)\n      have h1 : 1 ∈ T_n := mem_Icc.mpr ⟨Nat.le_refl 1, one_le_n⟩\n\n      -- We show k = k * 1 is in setProd T_n\n      -- setProd T_n is the image of T_n × T_n under multiplication.\n      simp only [setProd, mem_image, Prod.exists]\n      use k, 1\n      constructor\n      -- Show that (k, 1) ∈ T_n × T_n\n      · exact mem_product.mpr ⟨hk, h1⟩\n      -- Show that k * 1 = k\n      · exact Nat.mul_one k\n\n    have h_nonempty : valid_subsets.Nonempty := ⟨T_n, T_n_is_valid⟩\n\n    let sizes := valid_subsets.image Finset.card\n\n    -- The min' function requires proof that the finset is non-empty.\n    have h_sizes_nonempty : sizes.Nonempty := h_nonempty.image Finset.card\n\n    -- We return the minimum card of all valid subsets.\n    sizes.min' h_sizes_nonempty\n\n\n@[category test, AMS 11]\nlemma a_1 : a 1 = 1 := by rfl\n\n@[category test, AMS 11]\nlemma a_2 : a 2 = 2 := by rfl\n\n@[category test, AMS 11]\nlemma a_3 : a 3 = 3 := by rfl\n\n@[category test, AMS 11]\nlemma a_4 : a 4 = 3 := by rfl\n\n@[category test, AMS 11]\nlemma a_5 : a 5 = 4 := by rfl\n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nIs $a(n) / \\pi(n)$ bounded as $n \\to \\infty$? - _Robert Israel_, Jan 09 2017\n\nA formal proof has been found with the methods described in\n[arxiv/2605.22763](https://arxiv.org/abs/2605.22763).\n-/\n@[category research solved, AMS 11, formal_proof using formal_conjectures at\n\"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/194806.wip.lean#L472\"]\ntheorem a_div_prime_counting_bounded : ∃ C : ℝ,\n    ∀ n : ℕ, 2 ≤ n → (a n : ℝ) / (Nat.primeCounting n : ℝ) ≤ C := by\n    sorry\n\nend OeisA194806\n",
  "statement_hash": "f318ba44069cb41e87b1f01398281c6ff51633b87d74d85aec8e332399a9797c",
  "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."
}