{
  "id": "3176",
  "ident": "NS.03176",
  "slug": "erdos-782",
  "title": "Erdős Problem 782",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Do the squares contain arbitrarily long quasi-progressions? That is, does there exist some\nconstant $C>0$ such that, for any $k$, the squares contain a sequence $x_1,\\ldots,x_k$ where, for\nsome $d$ and all $1\\leq i<k$,\n$$x_i+d\\leq x_{i+1}\\leq x_i+d+C.$$\n\nA question of Brown, Erdős, and Freedman [BEF90]. This is the first question. Here $C$ and $d$ are\npositive integers; $d\\geq 1$ excludes constant sequences.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos782.erdos_782.parts.i",
  "statement_lean": "theorem erdos_782.parts.i :\n    ∃ C : ℕ, 0 < C ∧ ∀ k : ℕ, ContainsQuasiProgression {n : ℕ | IsSquare n} C k",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Erdős Problem 782\n\n*References:*\n- [erdosproblems.com/782](https://www.erdosproblems.com/782)\n- [BEF90] Brown, T. C. and Erdős, P. and Freedman, A. R., _Quasi-progressions and descending\n  waves_. J. Combin. Theory Ser. A 53 (1990), 81-95.\n- [BFS03] Brown, T. C., Freedman, A. R. and Shiue, P. J.-S., _Progressions of squares_.\n  Australas. J. Combin. 27 (2003), 187-192.\n- [BEU26] Bremner, A., Elsholtz, C. and Ulas, M., _There are infinitely many Hilbert cubes of\n  dimension 3 in the set of squares_. [arXiv:2604.05459](https://arxiv.org/abs/2604.05459) (2026).\n- [CiGr07] Cilleruelo, J. and Granville, A., _Lattice points on circles, squares in arithmetic\n  progressions and sumsets of squares_. Additive combinatorics (2007), 241-262.\n- [DiEl12] Dietmann, R. and Elsholtz, C., _Hilbert cubes in progression-free sets and in the set\n  of squares II_. [arXiv:1207.1461](https://arxiv.org/abs/1207.1461) (2012).\n- [So07] Solymosi, J., _Elementary additive combinatorics_. Additive combinatorics (2007), 29-38.\n-/\n\n@[expose] public section\n\nnamespace Erdos782\n\n/-- `ContainsQuasiProgression S C k` says that `S` contains a $k$-term quasi-progression of\ndiameter $C$: terms $x_1,\\ldots,x_k\\in S$ and a difference $d\\geq 1$ with\n$x_i+d\\leq x_{i+1}\\leq x_i+d+C$ for all $1\\leq i<k$ (indexed from $0$ in Lean). The condition\n$d\\geq 1$ makes the terms strictly increasing, as in [BFS03]. -/\ndef ContainsQuasiProgression (S : Set ℕ) (C k : ℕ) : Prop :=\n  ∃ (x : ℕ → ℕ) (d : ℕ), 0 < d ∧ (∀ i < k, x i ∈ S) ∧\n    ∀ i, i + 1 < k → x i + d ≤ x (i + 1) ∧ x (i + 1) ≤ x i + d + C\n\n/-- The Hilbert cube with presentation $(a_0; b_1,\\ldots,b_d)$, that is,\n$$a_0+\\left\\{ \\sum_i \\epsilon_ib_i : \\epsilon_i\\in \\{0,1\\}\\right\\}.$$\nThe index set of the sum is the set of $i$ with $\\epsilon_i=1$. -/\ndef hilbertCube {d : ℕ} (a₀ : ℤ) (b : Fin d → ℤ) : Set ℤ :=\n  {x | ∃ ε : Finset (Fin d), x = a₀ + ∑ i ∈ ε, b i}\n\n/-- The base point $a_0$ lies in its Hilbert cube: take all $\\epsilon_i=0$. -/\n@[category API, AMS 11]\ntheorem mem_hilbertCube_self {d : ℕ} (a₀ : ℤ) (b : Fin d → ℤ) :\n    a₀ ∈ hilbertCube a₀ b :=\n  ⟨∅, by simp⟩\n\n/-- The squares $1, 25, 49$ form a $3$-term arithmetic progression, hence the squares contain a\n$3$-term quasi-progression of diameter $0$. -/\n@[category test, AMS 11]\ntheorem containsQuasiProgression_squares_three :\n    ContainsQuasiProgression {n : ℕ | IsSquare n} 0 3 := by\n  refine ⟨fun i ↦ 1 + 24 * i, 24, by norm_num, ?_, ?_⟩\n  · intro i hi\n    interval_cases i\n    · exact ⟨1, by norm_num⟩\n    · exact ⟨5, by norm_num⟩\n    · exact ⟨7, by norm_num⟩\n  · intro i _\n    show 1 + 24 * i + 24 ≤ 1 + 24 * (i + 1) ∧ 1 + 24 * (i + 1) ≤ 1 + 24 * i + 24 + 0\n    omega\n\n/--\nDo the squares contain arbitrarily long quasi-progressions? That is, does there exist some\nconstant $C>0$ such that, for any $k$, the squares contain a sequence $x_1,\\ldots,x_k$ where, for\nsome $d$ and all $1\\leq i<k$,\n$$x_i+d\\leq x_{i+1}\\leq x_i+d+C.$$\n\nA question of Brown, Erdős, and Freedman [BEF90]. This is the first question. Here $C$ and $d$ are\npositive integers; $d\\geq 1$ excludes constant sequences.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_782.parts.i :\n    ∃ C : ℕ, 0 < C ∧ ∀ k : ℕ, ContainsQuasiProgression {n : ℕ | IsSquare n} C k := by\n  sorry\n\n/--\nDo the squares contain arbitrarily large cubes\n$$a+\\left\\{ \\sum_i \\epsilon_ib_i : \\epsilon_i\\in \\{0,1\\}\\right\\}?$$\n\nA question of Brown, Erdős, and Freedman [BEF90]. This is the second question. The generators\n$b_i$ are nonzero integers, as in [BEU26]. Solymosi [So07] conjectured that the answer is no, and\nCilleruelo and Granville [CiGr07] observed that the answer is no conditional on the\nBombieri-Lang conjecture.\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_782.parts.ii :\n    ∀ d : ℕ, ∃ (a : ℤ) (b : Fin d → ℤ),\n      (∀ i, b i ≠ 0) ∧ hilbertCube a b ⊆ {n : ℤ | IsSquare n} := by\n  sorry\n\n/-- It is a classical fact that the squares do not contain arithmetic progressions of length\n$4$. -/\n@[category research solved, AMS 11]\ntheorem erdos_782.variants.no_four_term_ap :\n    Set.IsAPOfLengthFree {n : ℕ | IsSquare n} 4 := by\n  sorry\n\n/--\nDietmann and Elsholtz [DiEl12, Theorem 1] proved that, for all sufficiently large $N$, if\n$a_0\\geq 0$ and $b_1,\\ldots,b_d$ are distinct positive integers such that the Hilbert cube\n$a_0+\\{0,b_1\\}+\\cdots+\\{0,b_d\\}$ consists of squares in $[1,N]$, then $d\\leq 7\\log\\log N$.\n-/\n@[category research solved, AMS 11]\ntheorem erdos_782.variants.dietmann_elsholtz :\n    ∃ N₀ : ℕ, ∀ N ≥ N₀, ∀ (d : ℕ) (a₀ : ℤ) (b : Fin d → ℤ),\n      0 ≤ a₀ → Function.Injective b → (∀ i, 0 < b i) →\n      hilbertCube a₀ b ⊆ {n : ℤ | IsSquare n ∧ 1 ≤ n ∧ n ≤ N} →\n        (d : ℝ) ≤ 7 * Real.log (Real.log N) := by\n  sorry\n\nend Erdos782\n",
  "statement_hash": "0a2cff2f5c38d9e756c749ee41f27bfbff5c7a6105c1c8be3ec0fd1c42a1ef5d",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}