/- 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. -/ import FormalConjecturesUtil

Ratio of product of GCDs to product of factorials of floor divisions

$$a(n) = \frac{\prod_{j=1}^n \prod_{k=1}^n \gcd(j,k)}{\prod_{k=1}^n (\lfloor n/k \rfloor!)^k}$$

References:

namespace OeisA129365

$a(n) = \frac{\prod_{j=1}^n \prod_{k=1}^n \gcd(j,k)}{\prod_{k=1}^n (\lfloor n/k \rfloor!)^k}$.

def a (n : ) : := let num : := (Finset.Icc 1 n).prod fun j => (Finset.Icc 1 n).prod fun k => Nat.gcd j k let den : := (Finset.Icc 1 n).prod fun k => (n / k).factorial ^ k num / den

Sequence A004125: sum of remainders $n \bmod k$ for $1 \le k \le n$.

def b (n : ) : := k Finset.Icc 1 n, (n % k)

Value of the sequence a at 0.

@[category test, AMS 11] theorem a_0 : a 0 = 1 := a 0 = 1 All goals completed! 🐙

Value of the sequence a at 1.

@[category test, AMS 11] theorem a_1 : a 1 = 1 := a 1 = 1 All goals completed! 🐙

Value of the sequence a at 2.

@[category test, AMS 11] theorem a_2 : a 2 = 1 := a 2 = 1 All goals completed! 🐙

Value of the sequence a at 3.

@[category test, AMS 11] theorem a_3 : a 3 = 1 := a 3 = 1 All goals completed! 🐙

Value of the sequence a at 4.

@[category test, AMS 11] theorem a_4 : a 4 = 1 := a 4 = 1 All goals completed! 🐙

Conjecture (1): $a(n)$ is always an integer (the denominator divides the numerator).

Answer: true, see linked proof.

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/KitaKen1/oeis-a129365-conjectures/blob/9c0201540c337733d6b8afb2aff209f5489c122a/lean/OeisA129365FC.lean#L234-L395"] theorem conjecture1 (n : ) (hn : 0 < n) : ((Finset.Icc 1 n).prod fun k => (n / k).factorial ^ k) ((Finset.Icc 1 n).prod fun j => (Finset.Icc 1 n).prod fun k => Nat.gcd j k) := n:hn:0 < n k Finset.Icc 1 n, (n / k).factorial ^ k j Finset.Icc 1 n, k Finset.Icc 1 n, j.gcd k All goals completed! 🐙

Conjecture (2): If $p$ is a prime, then $p \mid a(n)$ if and only if $p \le n/3$.

Answer: true, see linked proof.

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/KitaKen1/oeis-a129365-conjectures/blob/9c0201540c337733d6b8afb2aff209f5489c122a/lean/OeisA129365FC.lean#L234-L395"] theorem conjecture2 (n p : ) (hn : 0 < n) (hp : p.Prime) : ( m : , a n = m p m) p n / 3 := n:p:hn:0 < nhp:Nat.Prime p(∃ m, a n = m p m) p n / 3 All goals completed! 🐙

Conjecture (3): For each positive integer $n$, prime $p$, and $0 \le k < p$, $\mathrm{ord}_p(a(np)) = \mathrm{ord}_p(a(np + k))$.

Answer: true, see linked proof.

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/KitaKen1/oeis-a129365-conjectures/blob/9c0201540c337733d6b8afb2aff209f5489c122a/lean/OeisA129365FC.lean#L234-L395"] theorem conjecture3 (n p k : ) (hn : 0 < n) (hp : p.Prime) (hk : k < p) : padicValRat p (a (n * p)) = padicValRat p (a (n * p + k)) := n:p:k:hn:0 < nhp:Nat.Prime phk:k < ppadicValRat p (a (n * p)) = padicValRat p (a (n * p + k)) All goals completed! 🐙

Conjecture (4): Let $b(n) = \mathrm{A004125}(n) = \sum_{k=1}^n (n \bmod k)$. Then $\mathrm{ord}p(a(np)) = \sum{i \ge 0} b(\lfloor n/p^i \rfloor)$.

Answer: true, see linked proof.

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/KitaKen1/oeis-a129365-conjectures/blob/9c0201540c337733d6b8afb2aff209f5489c122a/lean/OeisA129365FC.lean#L234-L395"] theorem conjecture4 (n p : ) (hn : 0 < n) (hp : p.Prime) : padicValRat p (a (n * p)) = ∑' i : , (b (n / p ^ i) : ) := n:p:hn:0 < nhp:Nat.Prime ppadicValRat p (a (n * p)) = ∑' (i : ), (b (n / p ^ i)) All goals completed! 🐙end OeisA129365