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 297

Source:Erdős Problems
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

Let N≥1N\geq 1. How many A⊆{1,…,N}A\subseteq \{1,\ldots,N\} are there such that ∑n∈A1n=1\sum_{n\in A}\frac{1}{n}=1?

Liu and Sawhney [LiSa24] proved that the count is 2(0.91⋯+o(1))N2^{(0.91\cdots+o(1))N}, where 0.91⋯0.91\cdots is an explicit number defined as the solution to a certain integral equation; independently the same asymptotic was proved by Conlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24]. We formalise the question as asking for the exponential growth rate lim⁡N→∞1Nlog⁡2#{A}\lim_{N\to\infty} \frac{1}{N}\log_2 \#\{A\}. The first conjunct is the existence and uniqueness of λ∗\lambda^*, which [LiSa24] state with the theorem.

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:question
Cite as:NS.01590 [math.NT] · NS.01590v1 for this version
Declaration:Erdos297.erdos_297
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:ef73c1007c3c12792bb3150c1bdef5d69a0714524911a620908d818506e2e8f3
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/ErdosProblems/297.lean

Formal statement

theorem erdos_297 : (∃! l : ℝ, massIntegral l = 1) ∧
    Tendsto (fun N : ℕ => Real.logb 2 (count 1 N) / N) atTop (𝓝 erdos_297.answer)
Show the full Challenge.lean (119 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 297

*References:*
- [erdosproblems.com/297](https://www.erdosproblems.com/297)
- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number
  theory*. Monographies de L'Enseignement Mathematique (1980).
- [CFHMPSV24] Conlon, D., Fox, J., He, X., Mubayi, D., Pham, H. T., Suk, A. and Verstraëte, J.,
  *A question of Erdős and Graham on Egyptian fractions*. arXiv:2404.16016 (2024).
- [LiSa24] Liu, Y. P. and Sawhney, M., *On further questions regarding unit fractions*.
  arXiv:2404.07113 (2024).
- [St24] Steinerberger, S., *On a problem involving unit fractions*. arXiv:2403.17041 (2024).
-/

@[expose] public section

open Filter
open scoped Topology

namespace Erdos297

/-- The number of $A \subseteq \{1, \ldots, N\}$ with $\sum_{n \in A} \frac{1}{n} = x$. -/
def count (x : ℚ) (N : ℕ) : ℕ :=
  {A ∈ (Finset.Icc 1 N).powerset | ∑ n ∈ A, (1 / (n : ℕ) : ℚ) = x}.card

@[category test, AMS 11]
theorem count_one_five : count 1 5 = 1 := by decide +kernel

@[category test, AMS 11]
theorem count_one_six : count 1 6 = 2 := by decide +kernel

@[category test, AMS 11]
theorem count_half_six : count (1 / 2) 6 = 2 := by decide +kernel

/--
The integral $\int_0^1 \frac{dy}{y(1 + e^{\lambda / y})}$, which equals
$\int_0^1 \frac{e^{-\lambda/y}}{1 + e^{-\lambda/y}} \frac{dy}{y}$. It diverges for
$\lambda \leq 0$ (the Lean integral is then `0`), so for $x > 0$ every solution of
`massIntegral λ = x` is positive.
-/
noncomputable def massIntegral (l : ℝ) : ℝ :=
  ∫ y in (0 : ℝ)..1, 1 / (y * (1 + Real.exp (l / y)))

/-- The unique real $\lambda_x$ with `massIntegral λ_x = x`, for $x > 0$. -/
noncomputable def lambdaOf (x : ℝ) : ℝ :=
  sInf {l : ℝ | massIntegral l = x}

/--
The constant $\gamma^* / \log 2 = 0.91\cdots$ of [LiSa24], where $\lambda^* = \lambda_1$ and
$\gamma^* = \lambda^* + \int_0^1 \log(1 + e^{-\lambda^*/y})\,dy$. Numerically
$\lambda^* \approx 0.127191$ and $\gamma^* \approx 0.631573$.
-/
noncomputable def erdos_297.answer : ℝ :=
  (lambdaOf 1 + ∫ y in (0 : ℝ)..1, Real.log (1 + Real.exp (-lambdaOf 1 / y))) / Real.log 2

/--
Let $N\geq 1$. How many $A\subseteq \{1,\ldots,N\}$ are there such that
$\sum_{n\in A}\frac{1}{n}=1$?

Liu and Sawhney [LiSa24] proved that the count is $2^{(0.91\cdots+o(1))N}$, where $0.91\cdots$ is
an explicit number defined as the solution to a certain integral equation; independently the same
asymptotic was proved by Conlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24]. We
formalise the question as asking for the exponential growth rate
$\lim_{N\to\infty} \frac{1}{N}\log_2 \#\{A\}$. The first conjunct is the existence and
uniqueness of $\lambda^*$, which [LiSa24] state with the theorem.
-/
@[category research solved, question value, AMS 11]
theorem erdos_297 : (∃! l : ℝ, massIntegral l = 1) ∧
    Tendsto (fun N : ℕ => Real.logb 2 (count 1 N) / N) atTop (𝓝 erdos_297.answer) := by
  sorry

/--
Steinerberger [St24] proved that, for $N$ sufficiently large, the number of
$A \subseteq \{1, \ldots, N\}$ with $\sum_{n\in A}\frac{1}{n} \leq 1$ is at most $2^{0.93N}$.
-/
@[category research solved, AMS 11]
theorem erdos_297.variants.steinerberger : ∀ᶠ N : ℕ in atTop,
    ({A ∈ (Finset.Icc 1 N).powerset | ∑ n ∈ A, (1 / (n : ℕ) : ℚ) ≤ 1}.card : ℝ) ≤
      2 ^ (0.93 * N : ℝ) := by
  sorry

/--
The binary-entropy exponent $c_x = \int_0^1 h\left(\frac{1}{1 + e^{\lambda_x / y}}\right) dy$ of
[CFHMPSV24], where $h$ is the binary entropy in bits.
-/
noncomputable def exponentOf (x : ℝ) : ℝ :=
  ∫ y in (0 : ℝ)..1, Real.binEntropy (1 / (1 + Real.exp (lambdaOf x / y))) / Real.log 2

/--
Conlon, Fox, He, Mubayi, Pham, Suk, and Verstraëte [CFHMPSV24] prove more generally, for any
$x\in \mathbb{Q}_{>0}$, that the number of $A\subseteq \{1,\ldots,N\}$ such that
$\sum_{n\in A}\frac{1}{n}=x$ is $2^{(c_x + o(1))N}$, with $c_x$ as in `exponentOf`.
-/
@[category research solved, AMS 11]
theorem erdos_297.variants.general (x : ℚ) (hx : 0 < x) : (∃! l : ℝ, massIntegral l = x) ∧
    Tendsto (fun N : ℕ => Real.logb 2 (count x N) / N) atTop (𝓝 (exponentOf x)) := by
  sorry

end Erdos297

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

nosorry fetch erdos-297
nosorry submit erdos-297 nosorry/erdos-297/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.