/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil

Least $m > 0$ coprime to $n$ such that $mn \mid C(m+n)$

The sequence $a(n)$ is the least positive integer $m$ such that $\gcd(m, n) = 1$ and $m \cdot n \mid C(m+n)$, where $C(k) = \frac{1}{k+1} \binom{2k}{k}$ is the $k$-th Catalan number.

References:

@[expose] public sectionnamespace OeisA248123open Nat Set

Least integer $m > 0$ such that $\gcd(m, n) = 1$ and $m \cdot n \mid C(m+n)$, where $C(k)$ is the $k$-th Catalan number. Returns $0$ if no such $m$ exists.

noncomputable def a (n : ℕ) : ℕ := sInf { m : ℕ | 0 < m ∧ Nat.gcd m n = 1 ∧ (m * n) ∣ catalan (m + n) }@[category test, AMS 11] theorem a_1 : a 1 = 1 := ⊢ a 1 = 1 ⊢ sInf {m | 0 < m ∧ m.gcd 1 = 1 ∧ m * 1 ∣ (m + 1).centralBinom / (m + 1 + 1)} = 1 exact IsLeast.csInf_eq (⊢ IsLeast {m | 0 < m ∧ m.gcd 1 = 1 ∧ m * 1 ∣ (m + 1).centralBinom / (m + 1 + 1)} 1 All goals completed! 🐙)@[category test, AMS 11] theorem a_2 : a 2 = 3 := ⊢ a 2 = 3 ⊢ sInf {m | 0 < m ∧ m.gcd 2 = 1 ∧ m * 2 ∣ (m + 2).centralBinom / (m + 2 + 1)} = 3 exact IsLeast.csInf_eq (⊢ IsLeast {m | 0 < m ∧ m.gcd 2 = 1 ∧ m * 2 ∣ (m + 2).centralBinom / (m + 2 + 1)} 3 All goals completed! 🐙)@[category test, AMS 11] theorem a_3 : a 3 = 2 := ⊢ a 3 = 2 ⊢ sInf {m | 0 < m ∧ m.gcd 3 = 1 ∧ m * 3 ∣ (m + 3).centralBinom / (m + 3 + 1)} = 2 exact IsLeast.csInf_eq (⊢ IsLeast {m | 0 < m ∧ m.gcd 3 = 1 ∧ m * 3 ∣ (m + 3).centralBinom / (m + 3 + 1)} 2 All goals completed! 🐙)@[category test, AMS 11] theorem a_4 : a 4 = 21 := ⊢ a 4 = 21 ⊢ sInf {m | 0 < m ∧ m.gcd 4 = 1 ∧ m * 4 ∣ (m + 4).centralBinom / (m + 4 + 1)} = 21 exact IsLeast.csInf_eq (⊢ IsLeast {m | 0 < m ∧ m.gcd 4 = 1 ∧ m * 4 ∣ (m + 4).centralBinom / (m + 4 + 1)} 21 All goals completed! 🐙)@[category test, AMS 11] theorem a_5 : a 5 = 9 := ⊢ a 5 = 9 ⊢ sInf {m | 0 < m ∧ m.gcd 5 = 1 ∧ m * 5 ∣ (m + 5).centralBinom / (m + 5 + 1)} = 9 exact IsLeast.csInf_eq (⊢ IsLeast {m | 0 < m ∧ m.gcd 5 = 1 ∧ m * 5 ∣ (m + 5).centralBinom / (m + 5 + 1)} 9 All goals completed! 🐙)

Conjecture: $a(n)$ exists for all $n > 0$. Since $a(n)$ is defined as the infimum of a set of positive integers, existence is equivalent to $0 < a(n)$.

@[category research open, AMS 11] theorem conjecture (n : ℕ) (hn : 0 < n) : 0 < a n := n:ℕhn:0 < n⊢ 0 < a n All goals completed! 🐙end OeisA248123