/- 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

Denominators of coefficients in Stirling's expansion for $\log(\Gamma(z))$

The $n$-th term is the denominator of $\frac{B_{2n}}{2n(2n-1)}$ where $B_{2n}$ is the $2n$-th Bernoulli number.

References:

@[expose] public sectionnamespace OeisA46969

Denominators of coefficients in Stirling's expansion for $\log(\Gamma(z))$.

def a (n : ) : := if n = 0 then 0 else let m := 2 * n let k := m * (m - 1) (bernoulli m / (k : )).den@[category test, AMS 11] theorem a_0 : a 0 = 0 := a 0 = 0 All goals completed! 🐙(6⁻¹ / 2).den = 12 All goals completed! 🐙(-1 / 30 / 12).den = 360 All goals completed! 🐙hchoose2:Nat.choose 6 2 = 15hchoose3:Nat.choose 6 3 = 20hchoose4:Nat.choose 6 4 = 15h5:bernoulli' 5 = 01 - k Finset.range 6, (Nat.choose 6 k) / (6 - k + 1) * bernoulli' k = 1 / 42 All goals completed! 🐙(1 / 42 / 30).den = 1260 All goals completed! 🐙hchoose2:Nat.choose 8 2 = 28hchoose3:Nat.choose 8 3 = 56hchoose4:Nat.choose 8 4 = 70hchoose5:Nat.choose 8 5 = 56hchoose6:Nat.choose 8 6 = 28h3:bernoulli' 3 = 0h5:bernoulli' 5 = 0h7:bernoulli' 7 = 01 - k Finset.range 8, (Nat.choose 8 k) / (8 - k + 1) * bernoulli' k = -1 / 30 All goals completed! 🐙(-1 / 30 / 56).den = 1680 All goals completed! 🐙hchoose2:Nat.choose 10 2 = 45hchoose3:Nat.choose 10 3 = 120hchoose4:Nat.choose 10 4 = 210hchoose5:Nat.choose 10 5 = 252hchoose6:Nat.choose 10 6 = 210hchoose7:Nat.choose 10 7 = 120hchoose8:Nat.choose 10 8 = 45h3:bernoulli' 3 = 0h5:bernoulli' 5 = 0h7:bernoulli' 7 = 0h9:bernoulli' 9 = 01 - k Finset.range 10, (Nat.choose 10 k) / (10 - k + 1) * bernoulli' k = 5 / 66 All goals completed! 🐙(5 / 66 / 90).den = 1188 All goals completed! 🐙

Conjecture I: if $n > 2$, then $\frac{a(\text{A005382}(n))}{12}$ is prime, where A005382 is the sequence of primes $p$ such that $2p-1$ is also prime. Since $\text{A005382}(1) = 2$, $\text{A005382}(2) = 3$ and $\text{A005382}(3) = 7$, this says that $\frac{a(p)}{12}$ is prime for every prime $p > 3$ such that $2p-1$ is also prime.

    Lorenzo Sauras Altuzarra, Oct 13 2020

@[category research open, AMS 11] theorem conjecture1 (p : ) (hp : p.Prime) (hp' : (2 * p - 1).Prime) (h3 : 3 < p) : (a p / 12).Prime := p:hp:Nat.Prime php':Nat.Prime (2 * p - 1)h3:3 < pNat.Prime (a p / 12) All goals completed! 🐙

Conjecture II: if $\frac{a(n)}{12}$ is prime, then $\frac{a(n-1)}{12} - (n-1)$, $\frac{a(n)}{12} - n$ and $\frac{a(n+2)}{12} - (n+2)$ are multiples of 6.

    Lorenzo Sauras Altuzarra, Oct 13 2020

This is false for $n = 236791$.

@[category research solved, AMS 11, formal_proof using lean4 at "https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_a046969_conjecture_2/Submission/Spec.lean#L845"] theorem conjecture2 : ¬ (n : ), 2 n 12 a n Nat.Prime (a n / 12) 12 a (n - 1) 12 a (n + 2) 6 ((a (n - 1) / 12 : ) - (n - 1 : )) 6 ((a n / 12 : ) - (n : )) 6 ((a (n + 2) / 12 : ) - (n + 2 : )) := ¬ (n : ), 2 n 12 OeisA46969.a n Nat.Prime (OeisA46969.a n / 12) 12 OeisA46969.a (n - 1) 12 OeisA46969.a (n + 2) 6 (OeisA46969.a (n - 1)) / 12 - (n - 1) 6 (OeisA46969.a n) / 12 - n 6 (OeisA46969.a (n + 2)) / 12 - (n + 2) All goals completed! 🐙end OeisA46969