{
  "id": "1241",
  "ident": "NS.01241",
  "slug": "erdos-186",
  "title": "Erdős Problem 186",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $F(N)$ be the maximal size of $A\\subseteq \\{1,\\ldots,N\\}$ which is 'non-averaging', so that\nno $n\\in A$ is the arithmetic mean of at least two elements in $A$. What is the order of growth\nof $F(N)$?\n\nIt is known that $N^{1/4}\\ll F(N) \\ll N^{1/4+o(1)}$: the lower bound is due to Bosznay [Bo89] and\nthe upper bound to Pham and Zakharov [PhZa24, Theorem 1]. So $\\log F(N)/\\log N\\to 1/4$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos186.erdos_186",
  "statement_lean": "theorem erdos_186 :\n    Tendsto (fun N : ℕ ↦ Real.log (F N) / Real.log N) atTop (𝓝 (1 / 4))",
  "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# Erdős Problem 186\n\n*References:*\n- [erdosproblems.com/186](https://www.erdosproblems.com/186)\n- [Bo89] Bosznay, Á. P., *On the lower estimation of nonaveraging sets*. Acta Math. Hungar.\n  (1989), 155-157.\n- [ErSa90] Erdős, P. and Sárközy, A., *On a problem of Straus*. Disorder in physical systems\n  (1990), 55-66.\n- [PhZa24] Pham, H. T. and Zakharov, D., *Sharp bound for the Erdős–Straus non-averaging set\n  problem*. [arXiv:2410.14624](https://arxiv.org/abs/2410.14624) (2024).\n-/\n\n@[expose] public section\n\nopen Filter Topology\n\nnamespace Erdos186\n\n/-- A finite set $A$ of natural numbers is *non-averaging* if no $a \\in A$ is the arithmetic mean\nof at least two other elements of $A$: there is no $S \\subseteq A \\setminus \\{a\\}$ with\n$|S| \\geq 2$ and $\\sum_{x \\in S} x = |S| \\cdot a$. This agrees with [PhZa24] (\"a nonempty subset of\n$A$ not containing $a$\"), since a single element other than $a$ never has mean $a$. -/\ndef NonAveraging (A : Finset ℕ) : Prop :=\n  ∀ a ∈ A, ∀ S ⊆ A.erase a, 2 ≤ S.card → (∑ x ∈ S, x) ≠ S.card * a\n\ninstance (A : Finset ℕ) : Decidable (NonAveraging A) := by\n  unfold NonAveraging; infer_instance\n\n/-- $F(N)$ is the maximal size of a non-averaging subset of $\\{1, \\dots, N\\}$. -/\ndef F (N : ℕ) : ℕ :=\n  (((Finset.Icc 1 N).powerset).filter NonAveraging).sup Finset.card\n\n/-- Every non-averaging $A \\subseteq \\{1, \\dots, N\\}$ has at most $F(N)$ elements. -/\n@[category API, AMS 11]\ntheorem card_le_F {N : ℕ} {A : Finset ℕ} (hA : A ⊆ Finset.Icc 1 N) (hna : NonAveraging A) :\n    A.card ≤ F N :=\n  Finset.le_sup (f := Finset.card) (by simp [hA, hna])\n\n/-- $\\{1, 2, 3\\}$ is not non-averaging, since $2$ is the mean of $1$ and $3$. -/\n@[category test, AMS 11]\ntheorem not_nonAveraging_one_two_three : ¬ NonAveraging {1, 2, 3} := by\n  decide\n\n/-- $\\{1, 2, 4\\}$ is non-averaging. -/\n@[category test, AMS 11]\ntheorem nonAveraging_one_two_four : NonAveraging {1, 2, 4} := by\n  decide\n\n/--\nLet $F(N)$ be the maximal size of $A\\subseteq \\{1,\\ldots,N\\}$ which is 'non-averaging', so that\nno $n\\in A$ is the arithmetic mean of at least two elements in $A$. What is the order of growth\nof $F(N)$?\n\nIt is known that $N^{1/4}\\ll F(N) \\ll N^{1/4+o(1)}$: the lower bound is due to Bosznay [Bo89] and\nthe upper bound to Pham and Zakharov [PhZa24, Theorem 1]. So $\\log F(N)/\\log N\\to 1/4$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_186 :\n    Tendsto (fun N : ℕ ↦ Real.log (F N) / Real.log N) atTop (𝓝 (1 / 4)) := by\n  sorry\n\n/--\nPham and Zakharov [PhZa24, Theorem 1] proved that every non-averaging subset of\n$\\{1,\\ldots,N\\}$ has size at most $N^{1/4+o(1)}$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_186.variants.pham_zakharov :\n    ∀ ε : ℝ, 0 < ε → ∀ᶠ N : ℕ in atTop, (F N : ℝ) ≤ (N : ℝ) ^ ((1 : ℝ) / 4 + ε) := by\n  sorry\n\n/-- The lower bound $N^{1/4}\\ll F(N)$ is due to Bosznay [Bo89]. -/\n@[category research solved, AMS 11]\ntheorem erdos_186.variants.bosznay :\n    ∃ c : ℝ, 0 < c ∧ ∀ᶠ N : ℕ in atTop, c * (N : ℝ) ^ ((1 : ℝ) / 4) ≤ F N := by\n  sorry\n\n/-- The original upper bound of Erdős and Sárközy [ErSa90] was $F(N)\\ll (N\\log N)^{1/2}$. -/\n@[category research solved, AMS 11]\ntheorem erdos_186.variants.erdos_sarkozy :\n    ∃ C : ℝ, 0 < C ∧ ∀ᶠ N : ℕ in atTop, (F N : ℝ) ≤ C * Real.sqrt ((N : ℝ) * Real.log N) := by\n  sorry\n\nend Erdos186\n",
  "statement_hash": "4774cb18e445984fb756bd702ac9eeb1dbd5fc0beb954dda9c0834c999343223",
  "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."
}