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 220

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 and A={a1<⋯<aϕ(n)}={1≤m<n:(m,n)=1}.A = \{a_1 < \cdots < a_{\phi(n)}\} = \{1 \leq m < n : (m, n) = 1\}. Is it true that ∑1≤k<ϕ(n)(ak+1−ak)2≪n2ϕ(n)?\sum_{1 \leq k < \phi(n)} (a_{k+1} - a_k)^2 \ll \frac{n^2}{\phi(n)}?

A problem of Erdős [Er40, Er73, ErGr80], which is discussed in problem B40 of Guy's collection [Gu04]. The answer is yes, as proved by Montgomery and Vaughan [MoVa86], who in fact proved that ∑1≤k<ϕ(n)(ak+1−ak)γ≪nγ/ϕ(n)γ−1\sum_{1 \leq k < \phi(n)} (a_{k+1} - a_k)^\gamma \ll n^\gamma / \phi(n)^{\gamma - 1} for every γ≥1\gamma \geq 1.

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

Formal statement

theorem erdos_220 :
    ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 1 ≤ n →
      (sumSquaredGaps (sortedTotatives n) : ℝ) ≤ C * (n : ℝ) ^ 2 / (n.totient : ℝ)
Show the full Challenge.lean (70 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Erdős Problem 220

*References:*
- [erdosproblems.com/220](https://www.erdosproblems.com/220)
- [Er40] Erdős, P., *The difference of consecutive primes*. Duke Math. J. (1940), 438--441.
- [Er73] Erdős, P., *Problems and results on combinatorial number theory*. A survey of
  combinatorial theory (Proc. Internat. Sympos., Colorado State Univ., Fort Collins, Colo., 1971)
  (1973), 117-138.
- [ErGr80] Erdős, P. and Graham, R., *Old and new problems and results in combinatorial number
  theory*. Monographies de L'Enseignement Mathematique (1980).
- [MoVa86] Montgomery, H. L. and Vaughan, R. C., *On the distribution of reduced residues*. Ann. of
  Math. (2) (1986), 311-333.
- [Gu04] Guy, Richard K., *Unsolved problems in number theory*. (2004), xviii+437.
-/

@[expose] public section

namespace Erdos220

/-- The sum of the squared differences of adjacent entries of a list of natural numbers. -/
def sumSquaredGaps : List ℕ → ℕ
  | a :: b :: rest => (b - a) ^ 2 + sumSquaredGaps (b :: rest)
  | _ => 0

/-- The reduced residues `1 ≤ m < n` with `(m, n) = 1`, in increasing order. -/
def sortedTotatives (n : ℕ) : List ℕ :=
  ((Finset.Ico 1 n).filter fun m => m.Coprime n).sort (· ≤ ·)

set_option linter.style.formal_proof_palomar false in
/--
Let $n \geq 1$ and
$$A = \{a_1 < \cdots < a_{\phi(n)}\} = \{1 \leq m < n : (m, n) = 1\}.$$
Is it true that
$$\sum_{1 \leq k < \phi(n)} (a_{k+1} - a_k)^2 \ll \frac{n^2}{\phi(n)}?$$

A problem of Erdős [Er40, Er73, ErGr80], which is discussed in problem B40 of Guy's collection
[Gu04]. The answer is yes, as proved by Montgomery and Vaughan [MoVa86], who in fact proved that
$\sum_{1 \leq k < \phi(n)} (a_{k+1} - a_k)^\gamma \ll n^\gamma / \phi(n)^{\gamma - 1}$ for every
$\gamma \geq 1$.
-/
@[category research solved, question, AMS 11, formal_proof using lean4 at
  "https://github.com/plby/lean-proofs/blob/8822f7ddef30fadbd92e1c6ab4ed897af356af5e/src/latest/ErdosProblems/Erdos220.lean#L39"]
theorem erdos_220 :
    ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 1 ≤ n →
      (sumSquaredGaps (sortedTotatives n) : ℝ) ≤ C * (n : ℝ) ^ 2 / (n.totient : ℝ) := by
  sorry

end Erdos220

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

nosorry fetch erdos-220
nosorry submit erdos-220 nosorry/erdos-220/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.