Title:Erdős Problem 844
Statement:Let be such that, for all , the product is not squarefree.
Is the maximum size of such an achieved by taking to be the set of even numbers and odd non-squarefree numbers?
A problem of Erdős and Sárközy.
Weisenberg has provided the following positive proof. It is clear that such a maximal must contain all non-squarefree numbers. It therefore suffices to find the largest size of a subset of all squarefree numbers in such that any two have at least one prime factor in common. By the result of Chvátal [Ch74] discussed in [701] this is maximised by the set of all even squarefree numbers.
An alternative proof was independently found by Alexeev, Mixon, and Sawin [AMS25].
This was formalized in Lean by Jennings using Aristotle.
| Subjects: | Combinatorics (math.CO); Number Theory (math.NT) |
| MSC classes: | 05, 11 |
| Tags: | question, formal_proof |
| Cite as: | NS.03386 [math.CO] · NS.03386v1 for this version |
| Declaration: | Erdos844.erdos_844 |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | be80837896db67e8894caf02b8f18c39ed1ab381940e792bf5cd9f0a391966dc |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/ErdosProblems/844.lean |
Formal statement
theorem erdos_844 : ∀ N : ℕ,
IsGreatest {k : ℕ | ∃ A ⊆ Finset.Icc 1 N,
(∀ a ∈ A, ∀ b ∈ A, ¬ Squarefree (a * b)) ∧ A.card = k}
(evenOrOddNonSquarefree N).cardShow the full Challenge.lean (69 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Erdős Problem 844
*References:*
- [erdosproblems.com/844](https://www.erdosproblems.com/844)
- [AMS25] Alexeev, B., Mixon, D. and Sawin, W., *The independence and clique cover numbers of the
squarefree graph*. arXiv:2507.01928 (2025).
- [Ch74] Chvátal, V., *Intersecting families of edges in hypergraphs having the hereditary
property*. (1974), 61-66.
-/
@[expose] public section
namespace Erdos844
/-- Those $n \in \{1,\ldots,N\}$ which are even or not squarefree, that is, the set of even
numbers together with the odd non-squarefree numbers. -/
def evenOrOddNonSquarefree (N : ℕ) : Finset ℕ :=
(Finset.Icc 1 N).filter (fun n => 2 ∣ n ∨ ¬ Squarefree n)
set_option linter.style.formal_proof_palomar false in
/--
Let $A\subseteq \{1,\ldots,N\}$ be such that, for all $a,b\in A$, the product $ab$ is not
squarefree.
Is the maximum size of such an $A$ achieved by taking $A$ to be the set of even numbers and
odd non-squarefree numbers?
A problem of Erdős and Sárközy.
Weisenberg has provided the following positive proof. It is clear that such a maximal $A$ must
contain all non-squarefree numbers. It therefore suffices to find the largest size of a subset
of all squarefree numbers in $\{1,\ldots,N\}$ such that any two have at least one prime factor
in common. By the result of Chvátal [Ch74] discussed in [701] this is maximised by the set of
all even squarefree numbers.
An alternative proof was independently found by Alexeev, Mixon, and Sawin [AMS25].
This was formalized in Lean by Jennings using Aristotle.
-/
@[category research solved, question, AMS 5 11, formal_proof using lean4 at
"https://gist.githubusercontent.com/JohnEdwardJennings/e32f2c412b0225091e7519d60741bd2d/raw/7d811ea413e2f7c0c0442749958aaac421eb6807/Erdos844.lean"]
theorem erdos_844 : ∀ N : ℕ,
IsGreatest {k : ℕ | ∃ A ⊆ Finset.Icc 1 N,
(∀ a ∈ A, ∀ b ∈ A, ¬ Squarefree (a * b)) ∧ A.card = k}
(evenOrOddNonSquarefree N).card := by
sorry
end Erdos844
To prove it: keep every definition of Challenge.lean unchanged and prove Erdos844.erdos_844 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_erdos_844 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry fetch erdos-844 nosorry submit erdos-844 nosorry/erdos-844/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.