{
  "id": "2856",
  "ident": "NS.02856",
  "slug": "erdos-686",
  "title": "Erdős Problem 686",
  "status": "open",
  "statement_status": "reviewed",
  "statement_md": "Can every integer $N≥2$ be written as\n$$N=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question"
  ],
  "collection": "erdos",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "Erdos686.erdos_686",
  "statement_lean": "theorem erdos_686 :\n    ∀ N ≥ (2 : ℕ), ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (N : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i))",
  "challenge_source": "/-\nCopyright 2025 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 686\n\n*References:*\n- [erdosproblems.com/686](https://www.erdosproblems.com/686)\n- [Er79d] Erdős, P., *Some unconventional problems in number theory*. Acta Math.\n  Acad. Sci. Hungar. (1979), 71-80.\n-/\n\n@[expose] public section\n\nnamespace Erdos686\n\n/--\nCan every integer $N≥2$ be written as\n$$N=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_686 :\n    ∀ N ≥ (2 : ℕ), ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (N : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  sorry\n\n/--\nCan every square $N≥2$ be written as\n$$N=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_686.variants.square :\n    ∀ N ≥ (2 : ℕ),  (IsSquare N) → ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (N : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  sorry\n\n/--\nCan $4$ be written as\n$$4=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_686.variants.four :\n    ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (4 : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  sorry\n\n/--\nThe number $4$ cannot be written as\n$$4=\\frac{\\prod_{1\\leq i\\leq 2}(m+i)}{\\prod_{1\\leq i\\leq 2}(n+i)}$$\nfor $m≥n+2$!\n-/\n@[category research solved, AMS 11]\ntheorem erdos_686.variants.four_two :\n    ¬ ∃ᵉ (n : ℕ) (m ≥ n + 2),\n      (4 : ℚ) = (∏ i ∈ Finset.Icc 1 2, (m + i)) / (∏ i ∈ Finset.Icc 1 2, (n + i)) := by\n  simp only [Finset.prod_Icc_succ_top (by decide : 1 ≤ 2), Finset.Icc_self,\n    Finset.prod_singleton]\n  push Not\n  intro n m hm\n  rw [ne_eq, eq_div_iff (by positivity : (↑((n + 1) * (n + (1 + 1))) : ℚ) ≠ 0)]\n  push_cast\n  intro h\n  have h' : 4 * ((n + 1) * (n + 2)) = (m + 1) * (m + 2) := by exact_mod_cast h\n  by_cases hc : m < 2 * (n + 1) <;> nlinarith\n\n/--\nThe number $4$ cannot be written as\n$$4=\\frac{\\prod_{1\\leq i\\leq 3}(m+i)}{\\prod_{1\\leq i\\leq 3}(n+i)}$$\nfor $m≥n+3$!\n\nSee [comment section on erdosproblems.com](https://www.erdosproblems.com/forum/thread/686#post-4599)\n-/\n@[category research solved, AMS 11]\ntheorem erdos_686.variants.four_three :\n    ¬ ∃ᵉ (n : ℕ) (m ≥ n + 3),\n      (4 : ℚ) = (∏ i ∈ Finset.Icc 1 3, (m + i)) / (∏ i ∈ Finset.Icc 1 3, (n + i)) := by\n  sorry\n\n/--\nCan $9$ be written as\n$$9=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_686.variants.nine :\n    ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (9 : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  -- Witness: k = 3, n = 11, m = 25, since (26·27·28)/(12·13·14) = 19656/2184 = 9.\n  refine ⟨3, by norm_num, 11, 25, by norm_num, ?_⟩\n  norm_num [Finset.prod_Icc_succ_top, Finset.Icc_self, Finset.prod_singleton]\n\n/--\nCan $25$ be written as\n$$25=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research open, question, AMS 11]\ntheorem erdos_686.variants.twenty_five :\n    ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (25 : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  sorry\n\n/--\nCan every non-square $N≥2$ be written as\n$$N=\\frac{\\prod_{1\\leq i\\leq k}(m+i)}{\\prod_{1\\leq i\\leq k}(n+i)}$$\nfor some $k≥2$ and $m≥n+k$?\n-/\n@[category research solved, question, AMS 11]\ntheorem erdos_686.variants.non_square :\n    ∀ N ≥ (2 : ℕ), (¬ IsSquare N) → ∃ᵉ (k ≥ 2) (n : ℕ) (m ≥ n + k),\n      (N : ℚ) = (∏ i ∈ Finset.Icc 1 k, (m + i)) / (∏ i ∈ Finset.Icc 1 k, (n + i)) := by\n  intro N hN_ge_2 hN_not_square\n\n  have hN_not_square' : ¬ ∃ s, s * s = N := fun ⟨s, hs⟩ => hN_not_square ⟨s, hs.symm⟩\n\n  -- 1. Setup the existence for k = 2 and simplify the products\n  exists 2, by valid\n  field_simp\n  simp [Finset.prod_Icc_succ_top, Finset.Icc_self, Finset.prod_singleton]\n\n  -- 2. Case split on the existence of solutions for small bounds\n  by_cases h : {n | ∃ k, N * ((n + 1) * (n + 2)) = (k + 1) * (k + 2)}.Nonempty\n  · obtain rfl | hN_lt := hN_ge_2.eq_or_lt\n    · exact mod_cast\n        if a : ∃ a ∈ Finset.range 30, ∃ n ∈ Finset.range 30, _ then\n          a.imp fun a s => s.2.imp fun and => And.right\n        else\n          by exact (a (by native_decide)).elim\n\n    obtain rfl | hN_ne_3 := eq_or_ne N 3\n    · exact mod_cast\n        if a : ∃ a ∈ Finset.range 30, ∃ n ∈ Finset.range 30, _ then\n          a.imp fun and μ => μ.2.imp fun and => And.right\n        else\n          by exact (a (by native_decide)).elim\n\n    exact h.mono fun and =>\n      .imp fun a s =>\n        mod_cast (by refine ⟨by\n            nlinarith only [pow_three and, s, show N > 3 by valid], ?_⟩; push_cast [s.symm]; field_simp)\n\n  -- 3. Reduce the general case to Pell's Equation\n  convert (Pell.exists_of_not_isSquare _)\n  show @@_ ↔ ¬ IsSquare (N * 4 : ℤ) → _\n  · use\n      mod_cast h.elim ∘ .imp (fun n ⟨m, hle, heq⟩ => ⟨m, by\n        push_cast at heq; rw [eq_div_iff (by positivity : ((n : ℚ) + 1) * (↑n + 2) ≠ 0)] at heq\n        exact_mod_cast heq⟩),\n      (. (mod_cast hN_not_square' ∘ .rec (by\n          use . / 2\n          norm_num [←., true, Nat.div_mul_div_comm _, ((2).pow_dvd_pow_iff two_ne_zero).1, false, sq]))\n        |>.elim ↑? _)\n\n    use fun and ⟨A, B, _⟩ =>\n      absurd\n        (eq_add_of_sub_eq B)\n        (A.natAbs_sq ▸ and.natAbs_sq ▸ mod_cast fun and => h ?_)\n\n    -- Parity analysis\n    obtain ⟨l, hl⟩ | ⟨a, ha⟩ := ((by · bound : ℤ)).natAbs.even_or_odd\n    · exact absurd\n        (and.trans (by rw [mul_right_comm]) |>.symm.trans (by rw [(by valid :), sq, add_mul]))\n        (by valid)\n\n    match a with\n    | 0 => simp_all\n    | S + 1 =>\n        use A.natAbs + S, N * A.natAbs + S, by nlinarith only [‹_› ▸ and]\n\n  omega\n\n-- TODO: also formalize the follow-up question:\n-- “If $n$ and $k$ are fixed then can one say anything about the set of integers so represented?”\n\nend Erdos686\n",
  "statement_hash": "edca997d47e3773a0b623d923582e2fb10ca61ecb42b7d330c7ae1650d72d9f6",
  "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."
}