{
  "id": "1789",
  "ident": "NS.01789",
  "slug": "erdos-346",
  "title": "Erdős Problem 346",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "Is it true that for every lacunary, strongly complete sequence `A` that is not complete whenever\ninfinitely many terms are removed from it, `lim A (n + 1) / A n = (1 + √5) / 2`?\n\nThe answer is no. A counterexample recorded at [erdosproblems.com/346] has all successive ratios\nat least `6 / 5`, but has subsequences of successive ratios tending to two different limits,\n`(1 + √5) / 2` and `(1 + √5) / 2 + 1 / 4`.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos346.erdos_346",
  "statement_lean": "theorem erdos_346 : ¬ ∀ {A : ℕ → ℕ}, IsLacunary A → IsAddStronglyCompleteNatSeq A →\n    (∀ B : Set ℕ, B ⊆ range A → B.Infinite → ¬ IsAddComplete (range A \\ B)) →\n    Tendsto (fun n => A (n + 1) / (A n : ℝ)) atTop (𝓝 ((1 + √5) / 2))",
  "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 346\n\n*References:*\n - [erdosproblems.com/346](https://www.erdosproblems.com/346)\n - [Gr64d] Graham, R. L., A property of Fibonacci numbers. Fibonacci Quart. (1964), 1-10.\n - [ErGr80] Erdős, P. and Graham, R., Old and new problems and results in combinatorial number\n    theory. Monographies de L'Enseignement Mathematique (1980).\n -\n-/\n\n@[expose] public section\n\nopen Filter Topology Set\n\nnamespace Erdos346\n\n/-- Is it true that for every lacunary, strongly complete sequence `A` that is not complete whenever\ninfinitely many terms are removed from it, `lim A (n + 1) / A n = (1 + √5) / 2`?\n\nThe answer is no. A counterexample recorded at [erdosproblems.com/346] has all successive ratios\nat least `6 / 5`, but has subsequences of successive ratios tending to two different limits,\n`(1 + √5) / 2` and `(1 + √5) / 2 + 1 / 4`.\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_346 : ¬ ∀ {A : ℕ → ℕ}, IsLacunary A → IsAddStronglyCompleteNatSeq A →\n    (∀ B : Set ℕ, B ⊆ range A → B.Infinite → ¬ IsAddComplete (range A \\ B)) →\n    Tendsto (fun n => A (n + 1) / (A n : ℝ)) atTop (𝓝 ((1 + √5) / 2)) := by\n  sorry\n\n/-- We define a sequence `f` by the formula `f n = n.fib - (- 1) ^ n`. -/\ndef f (n : ℕ) : ℕ := if Even n then n.fib - 1 else n.fib + 1\n\n/-- The sequence `f` is lacunary. -/\n@[category test, AMS 11]\ntheorem erdos_346.variants.f_isLacunary : IsLacunary f := by\n  refine ⟨3/2, by norm_num, Filter.eventually_atTop.mpr ⟨9, fun k hk => ?_⟩⟩\n  -- Key: `2·fib(k+1) > 3·fib(k) + 5` for `k ≥ 9`, since\n  -- `2·fib(k+1) - 3·fib(k) = fib(k-3) ≥ fib(6) = 8 > 5`.\n  have hfib_strict : 3 * Nat.fib k + 5 < 2 * Nat.fib (k + 1) := by\n    obtain ⟨m, rfl⟩ : ∃ m, k = m + 9 := ⟨k - 9, by omega⟩\n    have h1 : Nat.fib (m + 9 + 1) = Nat.fib (m + 8) + Nat.fib (m + 9) := by\n      rw [show m + 9 + 1 = m + 8 + 2 from by ring, Nat.fib_add_two]\n    have h2 : Nat.fib (m + 9) = Nat.fib (m + 7) + Nat.fib (m + 8) := by\n      rw [show m + 9 = m + 7 + 2 from by ring, Nat.fib_add_two]\n    have h3 : Nat.fib (m + 8) = Nat.fib (m + 6) + Nat.fib (m + 7) := by\n      rw [show m + 8 = m + 6 + 2 from by ring, Nat.fib_add_two]\n    have h4 : 8 ≤ Nat.fib (m + 6) :=\n      le_trans (by decide : 8 ≤ Nat.fib 6) (Nat.fib_mono (by omega))\n    omega\n  have hfib_R : 3 * (Nat.fib k : ℝ) + 5 < 2 * Nat.fib (k + 1) := by\n    exact_mod_cast hfib_strict\n  have hpos : 1 ≤ Nat.fib k := Nat.fib_pos.mpr (by omega)\n  have hpos1 : 1 ≤ Nat.fib (k + 1) := Nat.fib_pos.mpr (by omega)\n  unfold f\n  by_cases heven : Even k\n  · have hodd : ¬ Even (k + 1) := by simp [Nat.even_add_one, heven]\n    rw [if_pos heven, if_neg hodd]\n    push_cast [Nat.cast_sub hpos]\n    linarith\n  · have hodd_plus : Even (k + 1) := by simp [Nat.even_add_one, heven]\n    rw [if_neg heven, if_pos hodd_plus]\n    push_cast [Nat.cast_sub hpos1]\n    linarith\n\n/-- The sequence `f` is strongly complete, and this is proved in [Gr64d]. -/\n@[category research solved, AMS 11]\ntheorem erdos_346.variants.f_isAddStronglyCompleteNatSeq : IsAddStronglyCompleteNatSeq f := by\n  sorry\n\n/-- The recurrence `f (m + 2) = f (m + 1) + f m - (-1) ^ m` for `m ≥ 1`, written without\nsubtraction. -/\n@[category API, AMS 11]\ntheorem erdos_346.variants.f_add_two (m : ℕ) (hm : 1 ≤ m) :\n    f (m + 2) + (if Even m then 1 else 0) = f (m + 1) + f m + (if Even m then 0 else 1) := by\n  have h1 : 1 ≤ Nat.fib m := Nat.fib_pos.2 hm\n  have h2 : 1 ≤ Nat.fib (m + 1) := Nat.fib_pos.2 (by omega)\n  have h3 : Nat.fib (m + 2) = Nat.fib m + Nat.fib (m + 1) := Nat.fib_add_two\n  by_cases he : Even m\n  · have he1 : ¬ Even (m + 1) := by simp [Nat.even_add_one, he]\n    have he2 : Even (m + 2) := by simp [Nat.even_add, he]\n    simp only [f, if_pos he, if_neg he1, if_pos he2]\n    omega\n  · have he1 : Even (m + 1) := by simp [Nat.even_add_one, he]\n    have he2 : ¬ Even (m + 2) := by simp [Nat.even_add, he]\n    simp only [f, if_neg he, if_pos he1, if_neg he2]\n    omega\n\n/-- `f 0 + ⋯ + f (m - 1) = f (m + 1) - [m even]` for `m ≥ 1`; this is [Gr64d, Eq. (1)]. -/\n@[category API, AMS 11]\ntheorem erdos_346.variants.sum_range_f (m : ℕ) (hm : 1 ≤ m) :\n    ∑ i ∈ Finset.range m, f i + (if Even m then 1 else 0) = f (m + 1) := by\n  induction m with\n  | zero => omega\n  | succ k ih =>\n    rcases Nat.eq_zero_or_pos k with rfl | hk\n    · decide\n    · have h1 := ih hk\n      have h2 : f (k + 1 + 1) + (if Even k then 1 else 0) =\n          f (k + 1) + f k + (if Even k then 0 else 1) := erdos_346.variants.f_add_two k hk\n      have hpar : (if Even (k + 1) then 1 else 0) + (if Even k then 1 else 0) = 1 := by\n        by_cases he : Even k <;> simp [Nat.even_add_one, he]\n      have hpar' : (if Even k then 1 else 0) + (if Even k then 0 else 1) = 1 := by\n        split_ifs <;> rfl\n      rw [Finset.sum_range_succ]\n      omega\n\n/-- `f` is strictly increasing from index `4` on. -/\n@[category API, AMS 11]\ntheorem erdos_346.variants.f_strictMono : StrictMono fun k => f (4 + k) := by\n  refine strictMono_nat_of_lt_succ fun k => ?_\n  show f (4 + k) < f (4 + (k + 1))\n  have h := erdos_346.variants.f_add_two (3 + k) (by omega)\n  have hf : 2 ≤ f (3 + k) := by\n    have h2 : 2 ≤ Nat.fib (3 + k) := le_trans (by decide : 2 ≤ Nat.fib 3) (Nat.fib_mono (by omega))\n    by_cases he : Even (3 + k)\n    · have h4 : 4 ≤ 3 + k := by\n        rcases Nat.even_iff.1 he with h\n        omega\n      have h3 : 3 ≤ Nat.fib (3 + k) :=\n        le_trans (by decide : 3 ≤ Nat.fib 4) (Nat.fib_mono h4)\n      simp only [f, if_pos he]\n      omega\n    · simp only [f, if_neg he]\n      omega\n  rw [show 4 + (k + 1) = 3 + k + 2 by omega, show 4 + k = 3 + k + 1 by omega]\n  split_ifs at h <;> omega\n\n/-- The sequence `f` is not complete whenever infinitely many terms are removed from it, and this\nis proved in [Gr64d]. -/\n@[category research solved, AMS 11]\ntheorem erdos_346.variants.f_not_isAddComplete {B : Set ℕ} (h : B ⊆ range f) (hB : B.Infinite) :\n    ¬ IsAddComplete (range f \\ B) :=\n  not_isAddComplete_range_diff_of_sum_range_le (n₀ := 4) erdos_346.variants.f_strictMono\n    (fun m hm => by have := erdos_346.variants.sum_range_f m (by omega); omega) h hB\n\n/-- Erdős and Graham [ErGr80] remark that it is easy to see that if `A (n + 1) / A n > (1 + √5) / 2`\nthen the second property is automatically satisfied. -/\n@[category research solved, AMS 11]\ntheorem erdos_346.variants.gt_goldenRatio_not_IsAddComplete {A : ℕ → ℕ}\n    (hA : ∀ n, (1 + √5) / 2 * A n < A (n + 1)) {B : Set ℕ} (h : B ⊆ range A) (hB : B.Infinite) :\n    ¬ IsAddComplete (range A \\ B) := by\n  -- Since `φ² = φ + 1`, the hypothesis gives `A (n + 2) > φ A (n + 1) > A (n + 1) + A n`, so the\n  -- partial sums satisfy `A 0 + ⋯ + A (m - 1) ≤ A (m + 1)`, and the general lemma applies.\n  have hs5 : (2 : ℝ) < √5 := by\n    have h4 : √(4 : ℝ) = 2 := by rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.sqrt_sq (by norm_num)]\n    linarith [Real.sqrt_lt_sqrt (by norm_num : (0 : ℝ) ≤ 4) (by norm_num : (4 : ℝ) < 5)]\n  have hs5sq : √5 * √5 = (5 : ℝ) := Real.mul_self_sqrt (by norm_num)\n  have hlt : ∀ n, A n < A (n + 1) := fun n => by\n    have h1 := hA n\n    have h0 : (0 : ℝ) ≤ A n := by positivity\n    exact_mod_cast (show (A n : ℝ) < A (n + 1) by nlinarith)\n  have hfib : ∀ n, A (n + 1) + A n < A (n + 2) := fun n => by\n    have h1 := hA n\n    have h2 := hA (n + 1)\n    have h0 : (0 : ℝ) ≤ A n := by positivity\n    have h0' : (0 : ℝ) ≤ A (n + 1) := by positivity\n    exact_mod_cast (show (A (n + 1) : ℝ) + A n < A (n + 2) by nlinarith)\n  have hsum : ∀ m, ∑ i ∈ Finset.range m, A i ≤ A (m + 1) := by\n    intro m\n    induction m with\n    | zero => simp\n    | succ k ih =>\n      have := hfib k\n      rw [Finset.sum_range_succ, show k + 1 + 1 = k + 2 by omega]\n      omega\n  exact not_isAddComplete_range_diff_of_sum_range_le (n₀ := 0)\n    (by simpa using strictMono_nat_of_lt_succ hlt) (fun m _ => hsum m) h hB\n\n/-- Erdős and Graham [ErGr80] also say that it is not hard to construct very irregular sequences\nsatisfying the aforementioned properties: there is a strictly increasing sequence `A` that is\nstrongly complete and not complete whenever infinitely many terms are removed from it, but with\n$\\liminf_n A(n+1)/A(n) = 1$ and $\\limsup_n A(n+1)/A(n) = \\infty$. -/\n@[category research solved, AMS 11]\ntheorem erdos_346.variants.example : ∃ A : ℕ → ℕ, StrictMono A ∧ IsAddStronglyCompleteNatSeq A ∧\n    (∀ B : Set ℕ, B ⊆ range A → B.Infinite → ¬ IsAddComplete (range A \\ B)) ∧\n    liminf (fun n => A (n + 1) / (A n : ℝ)) atTop = 1 ∧\n    limsup (fun n => A (n + 1) / (A n : ENNReal)) atTop = ⊤ := by\n  sorry\n\nend Erdos346\n",
  "statement_hash": "fc64384f3da2f01d624692bacf1957fac937a1348cd1f369d0e203254903612c",
  "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."
}