{
  "id": "2880",
  "ident": "NS.02880",
  "slug": "erdos-690",
  "title": "Erdős Problem 690",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Let $d_k(p)$ be the density of those integers whose $k$th smallest prime factor is $p$ (i.e. if\n$p_1<p_2<\\cdots$ are the primes dividing $n$ then $p_k=p$).\n\nFor fixed $k\\geq 1$ is $d_k(p)$ unimodular in $p$? That is, it first increases in $p$ until its\nmaximum then decreases.\n\nThe answer is no in general: Cambie [Ca25] has shown that $d_k(p)$ is unimodular for\n$1\\leq k\\leq 3$ and is not unimodular for $4\\leq k\\leq 20$.\n\nThe densities $d_k(p)$ exist (see `erdos_690.variants.hasDensity`), so the statement quantifies\nover any function `d` recording them.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos690.erdos_690",
  "statement_lean": "theorem erdos_690 :\n    ¬ ∀ k ≥ 1, ∀ d : ℕ → ℝ,\n      (∀ p, p.Prime → (kthPrimeFactorSet k p).HasDensity (d p)) → IsUnimodalOnPrimes d",
  "challenge_source": "/-\nCopyright 2025 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 690\n\n*References:*\n- [erdosproblems.com/690](https://www.erdosproblems.com/690)\n- [Er79e] Erdős, Paul, _Some unconventional problems in number theory_. Astérisque (1979), 73-82.\n- [Ca25] S. Cambie, _Resolution of Erdős' problems about unimodularity_. arXiv:2501.10333 (2025).\n- [WC26] S. Wang and D. Crapis, _A Complete Answer to Erdős Problem 690_. arXiv:2605.08542 (2026).\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Erdos690\n\n/-- The set of positive integers whose `k`-th smallest prime factor is `p`: if\n$p_1<p_2<\\cdots$ are the primes dividing $n$ then $p_k=p$. -/\ndef kthPrimeFactorSet (k p : ℕ) : Set ℕ :=\n  {n | 0 < n ∧ p ∈ n.primeFactors ∧ (n.primeFactors.filter (· < p)).card = k - 1}\n\n/-- A function on the primes is *unimodular* if it first increases in $p$ until its maximum then\ndecreases. -/\ndef IsUnimodalOnPrimes (f : ℕ → ℝ) : Prop :=\n  ∃ m, m.Prime ∧ (∀ p q, p.Prime → q.Prime → p ≤ q → q ≤ m → f p ≤ f q) ∧\n    ∀ p q, p.Prime → q.Prime → m ≤ p → p ≤ q → f q ≤ f p\n\nset_option linter.style.formal_proof_palomar false in\n/--\nLet $d_k(p)$ be the density of those integers whose $k$th smallest prime factor is $p$ (i.e. if\n$p_1<p_2<\\cdots$ are the primes dividing $n$ then $p_k=p$).\n\nFor fixed $k\\geq 1$ is $d_k(p)$ unimodular in $p$? That is, it first increases in $p$ until its\nmaximum then decreases.\n\nThe answer is no in general: Cambie [Ca25] has shown that $d_k(p)$ is unimodular for\n$1\\leq k\\leq 3$ and is not unimodular for $4\\leq k\\leq 20$.\n\nThe densities $d_k(p)$ exist (see `erdos_690.variants.hasDensity`), so the statement quantifies\nover any function `d` recording them.\n-/\n@[category research solved, question, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos690.lean#L2162\"]\ntheorem erdos_690 :\n    ¬ ∀ k ≥ 1, ∀ d : ℕ → ℝ,\n      (∀ p, p.Prime → (kthPrimeFactorSet k p).HasDensity (d p)) → IsUnimodalOnPrimes d := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- For every $k\\geq 1$ and prime $p$, the set of integers whose $k$th smallest prime factor is\n$p$ has a natural density. -/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos690.lean#L2162\"]\ntheorem erdos_690.variants.hasDensity (k p : ℕ) (hk : 1 ≤ k) (hp : p.Prime) :\n    ∃ δ : ℝ, (kthPrimeFactorSet k p).HasDensity δ := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- Cambie [Ca25] has shown that $d_k(p)$ is unimodular for $1\\leq k\\leq 3$. -/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos690.lean#L2162\"]\ntheorem erdos_690.variants.cambie_unimodal (k : ℕ) (hk : 1 ≤ k) (hk' : k ≤ 3)\n    (d : ℕ → ℝ) (hd : ∀ p, p.Prime → (kthPrimeFactorSet k p).HasDensity (d p)) :\n    IsUnimodalOnPrimes d := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/-- Cambie [Ca25] has shown that $d_k(p)$ is not unimodular for $4\\leq k\\leq 20$. -/\n@[category research solved, AMS 11, formal_proof using lean4 at\n  \"https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos690.lean#L2162\"]\ntheorem erdos_690.variants.cambie_not_unimodal (k : ℕ) (hk : 4 ≤ k) (hk' : k ≤ 20)\n    (d : ℕ → ℝ) (hd : ∀ p, p.Prime → (kthPrimeFactorSet k p).HasDensity (d p)) :\n    ¬ IsUnimodalOnPrimes d := by\n  sorry\n\n/-- Is $d_k(p)$ unimodular for any $k\\geq 21$?\n\nThe answer is no: $d_k(p)$ is not unimodal for any $k \\geq 4$ [WC26] (arXiv preprint). -/\n@[category research solved, question, AMS 11]\ntheorem erdos_690.variants.large_k :\n    ¬ ∃ k ≥ 21, ∀ d : ℕ → ℝ,\n      (∀ p, p.Prime → (kthPrimeFactorSet k p).HasDensity (d p)) → IsUnimodalOnPrimes d := by\n  sorry\n\nend Erdos690\n",
  "statement_hash": "98c8cae9d2500f8f223741cc83f81a1ed14ef6f49c3b047ea3d48ab4680326ce",
  "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."
}