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

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:

namespace 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! 🐙

$A005382(n)$ is the $n$-th prime $p$ such that $2p-1$ is also prime (1-based).

noncomputable def a005382 (n : ) : := Nat.nth (fun p p.Prime (2 * p - 1).Prime) (n - 1)

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.

    Lorenzo Sauras Altuzarra, Oct 13 2020

@[category research open, AMS 11] theorem conjecture1 (n : ) (hn : 2 < n) : (a (a005382 n) / 12).Prime := n:hn:2 < nNat.Prime (a (a005382 n) / 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

@[category research open, AMS 11] theorem conjecture2 (n : ) (hn : 2 n) (h_div : 12 a n) (h_prime : Nat.Prime (a n / 12)) (h_div_prev : 12 a (n - 1)) (h_div_succ : 12 a (n + 2)) : 6 ((a (n - 1) / 12 : ) - (n - 1 : )) 6 ((a n / 12 : ) - (n : )) 6 ((a (n + 2) / 12 : ) - (n + 2 : )) := n:hn:2 nh_div:12 a nh_prime:Nat.Prime (a n / 12)h_div_prev:12 a (n - 1)h_div_succ:12 a (n + 2)6 (a (n - 1)) / 12 - (n - 1) 6 (a n) / 12 - n 6 (a (n + 2)) / 12 - (n + 2) All goals completed! 🐙end OeisA46969