Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Erdős Problem 385 · trivial_ub

Source:Erdős Problems · erdosproblems.com/385
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

Note that trivially F(n)≤n+nF(n) \leq n + \sqrt{n}.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.01948 [math.NT] · NS.01948v1 for this version
Declaration:Erdos385.trivial_ub
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:5664dfc1ed359d4b16e8bd5c2783d728d2af37d49b3ab3796c4d86d979cdf11d
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/385.lean

Formal statement

theorem trivial_ub (n : ℕ) : F n ≤ n + √n
Show the full Challenge.lean (75 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 385

*Reference:* [erdosproblems.com/385](https://www.erdosproblems.com/385)
-/

@[expose] public section

namespace Erdos385

open Filter

/-- Let $F(n) := \max\{m + p(m) \mid m < n \textrm{ composite}\}$ where $p(m)$ is the least
prime divisor of $m$. -/
noncomputable def F (n : ℕ) : ℕ := sSup {m + m.minFac | (m < n) (_ : m.Composite)}

/-- Note that trivially $F(n) \leq n + \sqrt{n}$. -/
@[category test, AMS 11]
theorem trivial_ub (n : ℕ) : F n ≤ n + √n := by
  have hkey : F n ≤ n + n.sqrt := by
    apply csSup_le'
    rintro x ⟨m, hm, hcomp, rfl⟩
    have h1 : 0 < m := by have := hcomp.1; omega
    have hsq : m.minFac ^ 2 ≤ m := Nat.minFac_sq_le_self h1 hcomp.2
    have hmf : m.minFac ≤ m.sqrt := Nat.le_sqrt.mpr (by rw [← sq]; exact hsq)
    have hmn : m.sqrt ≤ n.sqrt := Nat.sqrt_le_sqrt hm.le
    omega
  calc (F n : ℝ) ≤ ((n + n.sqrt : ℕ) : ℝ) := by exact_mod_cast hkey
    _ = n + (n.sqrt : ℝ) := by push_cast; ring
    _ ≤ n + √n := by
        gcongr
        rw [show ((n.sqrt : ℕ) : ℝ) = √((n.sqrt ^ 2 : ℕ) : ℝ) from by
          push_cast; rw [Real.sqrt_sq (Nat.cast_nonneg _)]]
        exact Real.sqrt_le_sqrt (by exact_mod_cast Nat.sqrt_le' n)

/-- Let $F(n) := \max\{m + p(m) \mid m < n \textrm{ composite}\}$ where $p(m)$ is the least
prime divisor of $m$. Is it true that $F(n)>n$ for all sufficiently large $n$? -/
@[category research open, question, AMS 11]
theorem erdos_385.parts.i : ∀ᶠ n in atTop, n < F n := by
  sorry

/-- Let $F(n) := \max\{m + p(m) \mid m < n \textrm{ composite}\}$ where $p(m)$ is the least
prime divisor of $m$. Does $F(n) - n \to \infty$ as $n\to\infty$? -/
@[category research open, question, AMS 11]
theorem erdos_385.parts.ii : atTop.Tendsto (fun n ↦ F n - n) atTop := by
  sorry

/-- A question of Erdős, Eggleton, and Selfridge, who write that in fact it is possible that
this quantity is always at least $n+(1-o(1))\sqrt{n}$ -/
@[category research open, question, AMS 11]
theorem erdos_385.variants.lb : ∃ (e : ℕ → ℝ) (he : e =o[atTop] (1 : ℕ → ℝ)),
    ∀ n, n + (1 - e n) * √n ≤ F n :=
  sorry

end Erdos385

To prove it: keep every definition of Challenge.lean unchanged and prove Erdos385.trivial_ub with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_trivial_ub : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk erdos-385--trivial-ub      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch erdos-385--trivial-ub
nosorry submit erdos-385--trivial-ub nosorry/erdos-385--trivial-ub/Solution.lean --wait

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.