{
  "id": "4257",
  "ident": "NS.04257",
  "slug": "green-95",
  "title": "Ben Green's Open Problem 95",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Are a positive proportion of positive integers a sum of two palindromes?\n\n[Gr24] adds: \"Of course one must specify a base $g$ (say $g = 10$) in which one is working.\" We\nstate the question in every base $g \\ge 2$ and read \"a positive proportion\" as positive lower\ndensity. Whether $0$ counts as a palindrome does not change the density.\n\nThe answer is no: Zakharov showed that the number of $n < X$ which are sums of two base-$g$\npalindromes is at most $X / \\log^c X$ [Za24, Theorem 1], see `green_95.variants.zakharov`.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "green",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Green95.green_95",
  "statement_lean": "theorem green_95 : ∀ g : ℕ, 2 ≤ g → ¬ 0 < (sumsOfTwo g).lowerDensity",
  "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 95\n\n*References:*\n- [Gr24] [Green, Ben. \"100 open problems.\" (2024).](https://people.maths.ox.ac.uk/greenbj/papers/open-problems.pdf#problem.95)\n- [CLB18] Cilleruelo, J., Luca, F. and Baxter, L., *Every positive integer is a sum of three\n  palindromes*. Math. Comp. 87 (2018), 3023--3055.\n  [arXiv:1602.06208](https://arxiv.org/abs/1602.06208)\n- [Za24] Zakharov, D., *Most integers are not a sum of two palindromes*. Math. Proc. Cambridge\n  Philos. Soc. 177 (2024), 363--366. [arXiv:2402.10808](https://arxiv.org/abs/2402.10808)\n-/\n\n@[expose] public section\n\nopen Filter\n\nnamespace Green95\n\n/--\n`IsPalindrome g m` says that the base-`g` digits of `m` read the same in both directions.\n\nSince `Nat.digits g 0 = []`, the number $0$ is a palindrome. This is the convention of\n[CLB18, Section 2]. For $g \\le 1$ every number is a palindrome, so only bases $g \\ge 2$ are of\ninterest.\n-/\ndef IsPalindrome (g m : ℕ) : Prop :=\n  (Nat.digits g m).reverse = Nat.digits g m\n\n/-- `sumsOfTwo g` is the set of numbers $p + q$ with $p, q$ base-`g` palindromes ($0$ allowed). -/\ndef sumsOfTwo (g : ℕ) : Set ℕ :=\n  {n | ∃ p q, IsPalindrome g p ∧ IsPalindrome g q ∧ p + q = n}\n\n/--\n`sumsOfTwoPositive g` is the set of numbers $p + q$ with $p, q$ positive base-`g` palindromes.\nThis is the convention of [Za24], where palindromes are positive.\n-/\ndef sumsOfTwoPositive (g : ℕ) : Set ℕ :=\n  {n | ∃ p q, 0 < p ∧ 0 < q ∧ IsPalindrome g p ∧ IsPalindrome g q ∧ p + q = n}\n\n/-- $0$ is a palindrome in every base. -/\n@[category test, AMS 11]\ntheorem isPalindrome_zero (g : ℕ) : IsPalindrome g 0 := by\n  simp [IsPalindrome]\n\n/-- $121$ is a palindrome in base $10$. -/\n@[category test, AMS 11]\ntheorem isPalindrome_121 : IsPalindrome 10 121 := by\n  unfold IsPalindrome\n  rfl\n\n/--\nAre a positive proportion of positive integers a sum of two palindromes?\n\n[Gr24] adds: \"Of course one must specify a base $g$ (say $g = 10$) in which one is working.\" We\nstate the question in every base $g \\ge 2$ and read \"a positive proportion\" as positive lower\ndensity. Whether $0$ counts as a palindrome does not change the density.\n\nThe answer is no: Zakharov showed that the number of $n < X$ which are sums of two base-$g$\npalindromes is at most $X / \\log^c X$ [Za24, Theorem 1], see `green_95.variants.zakharov`.\n-/\n@[category research solved, question, AMS 11]\ntheorem green_95 : ∀ g : ℕ, 2 ≤ g → ¬ 0 < (sumsOfTwo g).lowerDensity := by\n  sorry\n\n/--\n**Zakharov's theorem.** For every integer $g \\ge 2$ there is a constant $c > 0$ such that, for all\nlarge $X$, the number of $n < X$ which are a sum of two positive base-$g$ palindromes is at most\n$X / \\log^c X$ [Za24, Theorem 1]. We state it for integer $X$. This answers the question of\n[CLB18], who had proved an upper bound $c X$ with $c < 1$ for $g \\ge 3$ [CLB18, Theorem 1.4].\n-/\n@[category research solved, AMS 11]\ntheorem green_95.variants.zakharov :\n    ∀ g : ℕ, 2 ≤ g → ∃ c : ℝ, 0 < c ∧ ∀ᶠ X : ℕ in atTop,\n      ((sumsOfTwoPositive g ∩ Set.Iio X).ncard : ℝ) ≤ (X : ℝ) / Real.log X ^ c := by\n  sorry\n\n/--\n**Cilleruelo, Luca and Baxter.** Let $g \\ge 5$. Then every positive integer is a sum of three\nbase-$g$ palindromes [CLB18, Theorem 1.2]. Here $0$ counts as a palindrome, as in [CLB18], so\nthis says that every positive integer is a sum of at most three positive palindromes.\n-/\n@[category research solved, AMS 11]\ntheorem green_95.variants.three_palindromes :\n    ∀ g : ℕ, 5 ≤ g → ∀ n : ℕ, 0 < n →\n      ∃ p q r, IsPalindrome g p ∧ IsPalindrome g q ∧ IsPalindrome g r ∧ p + q + r = n := by\n  sorry\n\n/--\n**Cilleruelo, Luca and Baxter.** Let $g \\ge 2$. There is a constant $c_1 > 0$ such that, for all\nreal $x \\ge 2$, the number of $n \\le x$ which are a sum of two base-$g$ palindromes is at least\n$x^{1 - c_1 / \\sqrt{\\log x}} = x e^{-c_1 \\sqrt{\\log x}}$ [CLB18, Theorem 1.3]. We count positive\n$n$ only.\n-/\n@[category research solved, AMS 11]\ntheorem green_95.variants.lower_bound :\n    ∀ g : ℕ, 2 ≤ g → ∃ c₁ : ℝ, 0 < c₁ ∧ ∀ x : ℝ, 2 ≤ x →\n      x ^ (1 - c₁ / Real.sqrt (Real.log x)) ≤\n        ({n : ℕ | 0 < n ∧ (n : ℝ) ≤ x ∧ n ∈ sumsOfTwo g}.ncard : ℝ) := by\n  sorry\n\nend Green95\n",
  "statement_hash": "052cfc2dcc604543891c56111e277d2c0c4d76cfd886732f0eb65eddcbaf8d69",
  "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."
}