/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ import FormalConjecturesUtil

Erdős Problem 156

References:

    erdosproblems.com/156

    [ESS94] Erdős, P. and Sárközy, A. and Sós, T., On Sum Sets of Sidon Sets, I. Journal of Number Theory (1994), 329-347.

    [Ru98b] Ruzsa, Imre Z., A small maximal Sidon set. Ramanujan J. (1998), 55-58.

open Finset Filteropen scoped Classical namespace Erdos156

The size of the smallest maximal Sidon set in ${1, \dots, N}$.

noncomputable def minMaximalSidonSet (N : ) : := sInf (((Icc 1 N).powerset.filter fun (A : Finset ) Set.IsMaximalSidonSetIn (A : Set ) N).image card : Set )

Does there exist a maximal Sidon set $A\subset {1,\ldots,N}$ of size $O(N^{1/3})$?

A question of Erdős, Sárközy, and Sós [ESS94].

@[category research open, AMS 5] theorem declaration uses 'sorry'erdos_156 : answer(sorry) (fun N (minMaximalSidonSet N : )) =O[atTop] (fun N (N : ) ^ (1 / 3 : )) := True (fun N => (minMaximalSidonSet N)) =O[atTop] fun N => N ^ (1 / 3) All goals completed! 🐙 @[category test, AMS 5] theorem greedySidonSet_isSidon (n : ) : IsSidon (Finset.greedySidonBelow n : Set ) := n:IsSidon (greedySidonBelow n) intro i₁ n:i₁:hi₁:i₁ (greedySidonBelow n) j₁ (greedySidonBelow n), i₂ (greedySidonBelow n), j₂ (greedySidonBelow n), i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:j₁ (greedySidonBelow n) i₂ (greedySidonBelow n), j₂ (greedySidonBelow n), i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n) i₂ (greedySidonBelow n), j₂ (greedySidonBelow n), i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:i₂ (greedySidonBelow n) j₂ (greedySidonBelow n), i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:hi₂:i₂ (greedySidonBelow n) j₂ (greedySidonBelow n), i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:hi₂:i₂ (greedySidonBelow n)j₂:j₂ (greedySidonBelow n) i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:hi₂:i₂ (greedySidonBelow n)j₂:hj₂:j₂ (greedySidonBelow n)i₁ + i₂ = j₁ + j₂ i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:hi₂:i₂ (greedySidonBelow n)j₂:hj₂:j₂ (greedySidonBelow n)eq:i₁ + i₂ = j₁ + j₂i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ n:i₁:hi₁:i₁ (greedySidonBelow n)j₁:hj₁:j₁ (greedySidonBelow n)i₂:hi₂:i₂ (greedySidonBelow n)j₂:hj₂:j₂ (greedySidonBelow n)eq:i₁ + i₂ = j₁ + j₂subset:greedySidonBelow n (greedySidon.aux n).1 := filter_subset (fun x => x n) (greedySidon.aux n).1i₁ = j₁ i₂ = j₂ i₁ = j₂ i₂ = j₁ All goals completed! 🐙

It is easy to prove that the greedy construction of a maximal Sidon set in ${1,\ldots,N}$ has size $\gg N^{1/3}$.

@[category research solved, AMS 5] theorem declaration uses 'sorry'erdos_156.variants.greedy_lower_bound : (fun N ((Finset.greedySidonBelow N).card : )) (fun N (N : ) ^ (1 / 3 : )) := (fun N => N ^ (1 / 3)) =O[atTop] fun N => (#(greedySidonBelow N)) All goals completed! 🐙

Ruzsa [Ru98b] constructed a maximal Sidon set of size $\ll (N\log N)^{1/3}$.

@[category research solved, AMS 5] theorem declaration uses 'sorry'erdos_156.variants.ruzsa_upper_bound : (fun N (minMaximalSidonSet N : )) (fun N ((N : ) * Real.log N) ^ (1 / 3 : )) := (fun N => (minMaximalSidonSet N)) =O[atTop] fun N => (N * Real.log N) ^ (1 / 3) All goals completed! 🐙 end Erdos156