{
  "id": "4173",
  "ident": "NS.04173",
  "slug": "green-66",
  "title": "Ben Green's Open Problem 66",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Is there always a sum of two squares between $X - \\frac{1}{10}X^{1/4}$ and $X$?\nWe formalize this as an eventual statement for sufficiently large real $X$.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "green",
  "source_url": "https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#section.8",
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Green66.green_66",
  "statement_lean": "theorem green_66 :\n    ∀ᶠ X : ℝ in atTop,\n      ∃ n : ℕ, IsSumOfTwoSquares n ∧\n        (n : ℝ) ∈ Set.Icc (X - (1 / 10 : ℝ) * X ^ (1 / 4 : ℝ)) X",
  "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# Ben Green's Open Problem 66\n\n*Reference:* [Ben Green's Open Problem 66](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#section.8)\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Green66\n\n/-- A natural number is a sum of two squares if it can be written as `a ^ 2 + b ^ 2`. -/\ndef IsSumOfTwoSquares (n : ℕ) : Prop :=\n  ∃ a b : ℕ, n = a ^ 2 + b ^ 2\n\n/--\nIs there always a sum of two squares between $X - \\frac{1}{10}X^{1/4}$ and $X$?\nWe formalize this as an eventual statement for sufficiently large real $X$.\n-/\n@[category research open, question, AMS 11]\ntheorem green_66 :\n    ∀ᶠ X : ℝ in atTop,\n      ∃ n : ℕ, IsSumOfTwoSquares n ∧\n        (n : ℝ) ∈ Set.Icc (X - (1 / 10 : ℝ) * X ^ (1 / 4 : ℝ)) X := by\n  sorry\n\n/--\nGreen notes that a well-known, almost trivial argument gives an $O(X^{1/4})$ bound on the left.\n-/\n@[category research solved, AMS 11]\ntheorem green_66.variants.trivial_bound :\n    ∃ C > (0 : ℝ), ∀ᶠ X : ℝ in atTop,\n      ∃ n : ℕ, IsSumOfTwoSquares n ∧\n        (n : ℝ) ∈ Set.Icc (X - C * X ^ (1 / 4 : ℝ)) X := by\n  -- Subtract the greatest square `u ^ 2` below `X`, then the greatest square `v ^ 2`\n  -- below `X - u ^ 2`.\n  refine ⟨5, by norm_num, ?_⟩\n  filter_upwards [eventually_ge_atTop (1 : ℝ)] with X hX\n  set s : ℝ := X ^ (1 / 4 : ℝ) with hs\n  have hs1 : 1 ≤ s := Real.one_le_rpow hX (by norm_num)\n  have hs4 : s ^ 4 = X := by\n    rw [hs, ← Real.rpow_natCast, ← Real.rpow_mul (by linarith)]\n    norm_num\n  obtain ⟨a, ha⟩ : ∃ a : ℕ, a = ⌊s ^ 2⌋₊ := ⟨_, rfl⟩\n  have ha1 : (a : ℝ) ≤ s ^ 2 := ha ▸ Nat.floor_le (by nlinarith)\n  have ha0 : (0 : ℝ) ≤ a := Nat.cast_nonneg a\n  set r : ℝ := X - (a : ℝ) ^ 2 with hr\n  have hr0 : 0 ≤ r := by nlinarith\n  obtain ⟨b, hb⟩ : ∃ b : ℕ, b = ⌊Real.sqrt r⌋₊ := ⟨_, rfl⟩\n  have hbr : (b : ℝ) ^ 2 ≤ r := by\n    nlinarith [Real.sqrt_nonneg r, Real.sq_sqrt hr0, hb ▸ Nat.floor_le (Real.sqrt_nonneg r)]\n  have hrb : r < ((b : ℝ) + 1) ^ 2 := by\n    nlinarith [Real.sqrt_nonneg r, Real.sq_sqrt hr0, hb ▸ Nat.lt_floor_add_one _]\n  have hb3 : (b : ℝ) < 2 * s := by\n    suffices (s ^ 2 - a) * (s ^ 2 + a) < 1 * (s ^ 2 + a) by nlinarith\n    exact mul_lt_mul_of_pos_right (by linarith [ha ▸ Nat.lt_floor_add_one _]) (by nlinarith)\n  refine ⟨a ^ 2 + b ^ 2, ⟨a, b, rfl⟩, ?_, ?_⟩ <;> grind\n\nend Green66\n",
  "statement_hash": "3314d9ff72c489b57434ec24979ac9a87795b20bd7a7ecc8ec7bb135b59cebf6",
  "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."
}