Research notes on every problem, and a library of the papers behind them. Built from the open erdos repository.
Updated
Claim. The largest with no square in has elements: the upper bound is Theorem 3 of Khalfalah, Lodha and Szemerédi, and the lower bound is Massias's construction. This answers the problem's question, up to the , and the site's label SOLVED covers this answer.
The result. A. Khalfalah, S. Lodha and E. Szemerédi, Tight bound for the density of sequence of integers the sum of no two of which is a perfect square, Discrete Math. 256 (2002), no. 1--2, 243--255, first circulated as DIMACS Technical Report 2000-39 of December 2000 (the day is not recorded, so the page name uses the first of that month; the journal issue is dated September 2002 in the Crossref record). Library home: khalfalah_2002_tight_bound_density_sum_no_two_perfect_square, which holds the report. A set of positive integers has property NS when is not a perfect square for all , and is the maximum of over with property NS. Theorem 3: for every there is such that for all . The outline (report p. 2): if has density , an exponential-sum count of the solutions of in is compared with a combinatorial count over residue classes modulo a highly composite , after shifting by multiples of ; the analytic count changes little under the shifts while the combinatorial count forces of the order solutions on average, the largest prime factor of , so cannot be free of square sums.
The lower bound. Massias's set, the integers together with those (eleven residue classes modulo ), has property NS and density . Lagarias, Odlyzko and Shearer had shown that is the largest density of a union of residue classes with property NS (J. Combin. Theory Ser. A 33 (1982), 167--185) and that for large (J. Combin. Theory Ser. A 34 (1983), 123--139; library card lagarias_1983_density_sequences_integers_sum_no_two); Theorem 3 closes the gap between the two. These are earlier partial results and have no claim pages of their own. Erdős and Sárközy had guessed in 1977 that density above forces a square sum (library card erdos_1977_differences_sums_integers_ii, printed p. 209); Massias's construction shows that guess false.
Why it settles the problem as stated. Property NS restricts sums of distinct elements, while the problem's also contains the doubles under the usual convention, a stronger restriction; so Theorem 3 bounds the problem's as well, and Massias's set still qualifies because none of its doubles is a square: for , and for the other three classes, none a square residue (checked on the library card). The exact maximum for each is not determined by the paper; the problem asks how large can be, and the asymptotic answer is what the site records as the resolution.
Acceptance. Reviewed: Thomas Bloom, the site's curator and independent
of the authors, labels the problem SOLVED and credits the paper in the
commentary (page last edited 7 April 2026; read from the cached snapshot of
2026-09-05), with the Lagarias--Odlyzko--Shearer bounds and Massias's
construction as the earlier steps; the discussion thread and the proof-claim
tab are empty. Refereed: Discrete Mathematics is a refereed journal. Not
counted as formalized: the linked Lean file, Erdos438.lean in Boris
Alexeev's lean-proofs repository, declares itself a formalization of a
solution to the problem, names Khalfalah, Lodha and Szemerédi as its informal
authors and Codex and GPT-5.6 Sol as its formal authors, and proves as
erdos_438 that the ratio of the extremal size to tends to , with
square-sum-freeness quantified over all pairs, the doubles included, from a
development of its own; its top-level file carries no sorry and was read as
text only, not built or audited here. The statement collection's
ErdosProblems/438.lean states the same limit with a sorry body under
research solved and points at that file through a formal_proof attribute;
a statement file is not a formalization and is not linked here. Nothing is
independently reviewed by this project: the library card records Theorem 3 as
checked clause by clause in the report's text layer, and the proof (sections
2--6) was not read in this corpus.
Depends on. No page of this wiki. The proof is self-contained in the paper.