Title:Coefficients of · conjecture_2
Statement:The coefficients of differ in sign from if and only if is a triangular number.
- Peter Bala, Mar 17 2022
Proof sketch (the kernel-checked development lives at the
formal_proofpermalink below). Write , where is the sum of over all sets of distinct positive integers with sum . A "down map" (lowering by one the least element of above its first gap) gives for all and . Hence the top nonzero layer dominates, where ; this reprovesconjecture_1and gives . Since , the sign of equals that of whenever . For , conjecture 2 is checked in the kernel from a certified table of ; for , explicit estimates (rational arithmetic and elementary bounds only) bound the cross sum by , which is less than .
| Subjects: | Number Theory (math.NT) |
| MSC classes: | 11 |
| Tags: | formal_proof |
| Cite as: | NS.05129 [math.NT] · NS.05129v1 for this version |
| Declaration: | OeisA185895.conjecture_2 |
| Verification: | Lean kernel (formal proof) |
| Points: | first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60 |
| Statement hash: | 36911051111a7a17400c2d6b33051a1b71b0c5fde18d7dd4618eee61e6d93c7f |
| Toolchain: | leanprover/lean4:v4.33.1 |
| Licence: | Apache-2.0 · google-deepmind/formal-conjectures contributors |
| Upstream: | FormalConjectures/OEIS/185895.lean |
Formal statement
theorem conjecture_2 (n : ℕ) (hn : 0 < n) :
c n * c (n - 1) < 0 ↔ n.IsTriangularShow the full Challenge.lean (148 lines) — definitions included
module
public import FormalConjecturesUtil
/-!
# Coefficients of $\prod_{k>0} (1 - x^k/k!)$
The sequence $a(n)$ has exponential generating function
$$E(x) = \prod_{k=1}^\infty \left(1 - \frac{x^k}{k!}\right),$$
so that $a(n) = n! [x^n] \prod_{k=1}^n \left(1 - \frac{x^k}{k!}\right)$.
Since $a(n)$ is a sum of multinomial coefficients with $\pm$ signs, it is always
an integer.
*References:*
- [A185895](https://oeis.org/A185895)
-/
@[expose] public section
open Polynomial
namespace OeisA185895
/-- The finite polynomial approximation $\prod_{k=1}^n (1 - X^k / k!)$. -/
noncomputable def p (n : ℕ) : Polynomial ℚ :=
∏ k ∈ Finset.Icc 1 n, (1 - C (1 / (k.factorial : ℚ)) * X ^ k)
@[category API, AMS 11]
private lemma C_mul_X_pow_mul (a b : ℚ) (n m : ℕ) :
(C a * X ^ n) * (C b * X ^ m) = C (a * b) * X ^ (n + m) := by
rw [C_mul, pow_add]
ring
/-- The sequence $a(n) = n! [x^n] \prod_{k=1}^n (1 - x^k / k!)$. -/
noncomputable def a (n : ℕ) : ℤ :=
if n = 0 then 1
else (coeff (p n) n * (n.factorial : ℚ)).floor
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by rfl
@[category test, AMS 11]
theorem a_1 : a 1 = -1 := by
dsimp [a, p]
simp [coeff_one]
rfl
@[category test, AMS 11]
theorem a_2 : a 2 = -1 := by
dsimp [a, p]
have hI : (Finset.Icc 1 2 : Finset ℕ) = {1, 2} := by decide
rw [hI, Finset.prod_insert (by decide), Finset.prod_singleton]
simp only [mul_sub, sub_mul, one_mul, mul_one, C_mul_X_pow_mul,
coeff_sub, coeff_one, coeff_C_mul_X_pow]
decide +kernel
@[category test, AMS 11]
theorem a_3 : a 3 = 2 := by
dsimp [a, p]
have hI : (Finset.Icc 1 3 : Finset ℕ) = {1, 2, 3} := by decide
rw [hI, Finset.prod_insert (by decide), Finset.prod_insert (by decide), Finset.prod_singleton]
simp only [mul_sub, sub_mul, one_mul, mul_one, C_mul_X_pow_mul,
coeff_sub, coeff_one, coeff_C_mul_X_pow]
decide +kernel
@[category test, AMS 11]
theorem a_4 : a 4 = 3 := by
dsimp [a, p]
have hI : (Finset.Icc 1 4 : Finset ℕ) = {1, 2, 3, 4} := by decide
rw [hI, Finset.prod_insert (by decide), Finset.prod_insert (by decide),
Finset.prod_insert (by decide), Finset.prod_singleton]
simp only [mul_sub, sub_mul, one_mul, mul_one, C_mul_X_pow_mul,
coeff_sub, coeff_one, coeff_C_mul_X_pow]
decide +kernel
/-- The $n$-th coefficient of the square of the ordinary generating function $A(x)^2$. -/
noncomputable def c (n : ℕ) : ℤ :=
∑ k ∈ Finset.range (n + 1), a k * a (n - k)
set_option linter.style.formal_proof_palomar false in
/--
$a(n)$ differs in sign from $a(n-1)$ if and only if $n$ is a triangular number
(checked up to $n = 1225 = (50 \cdot 51)/2$).
- _Peter Bala_, Mar 17 2022
-/
@[category research solved, AMS 11,
formal_proof using lean4 at "https://github.com/epoch-research/LeanOpenProblems-results/blob/f02efd9a8c5fc6a735d2a90c33e24f7278ce0ffc/runs/oeis-lite-200usd-sol-nk5wh4g0vh3546nm/oeis_185895_conjecture_1/Submission/Spec.lean#L4835"]
theorem conjecture_1 (n : ℕ) (hn : 0 < n) :
a n * a (n - 1) < 0 ↔ n.IsTriangular := by
sorry
set_option linter.style.formal_proof_palomar false in
/--
The coefficients $c(n)$ of $A(x)^2 = (\sum_{n \ge 0} a(n) x^n)^2$ differ in sign from $c(n-1)$
if and only if $n$ is a triangular number.
- _Peter Bala_, Mar 17 2022
**Proof sketch** (the kernel-checked development lives at the `formal_proof` permalink below).
Write $a(n)/n! = \sum_j (-1)^j L_j(n)$, where $L_j(n)$ is the sum of $\prod_{s \in S} 1/s!$ over
all sets $S$ of $j$ distinct positive integers with sum $n$. A "down map" (lowering by one the
least element of $S$ above its first gap) gives $L_{k-1}(n) \le \frac{91}{100} L_k(n)$ for all
$k \ge 1$ and $n \ge k(k+1)/2$. Hence the top nonzero layer $L_m(n)$ dominates, where
$m(m+1)/2 \le n < (m+1)(m+2)/2$; this reproves `conjecture_1` and gives
$|a(n)| \ge \frac{9}{100} n! L_m(n)$. Since $c(n) = 2a(n) + \sum_{0<k<n} a(k)a(n-k)$, the sign of
$c(n)$ equals that of $a(n)$ whenever $\sum_{0<k<n} |a(k)a(n-k)| < 2|a(n)|$. For $n \le 2500$,
conjecture 2 is checked in the kernel from a certified table of $a(n)$; for $n > 2500$, explicit
estimates (rational arithmetic and elementary bounds only) bound the cross sum by
$0.18 \cdot n! L_m(n)$, which is less than $2|a(n)|$.
-/
@[category research solved, AMS 11,
formal_proof using lean4 at
"https://github.com/kei825/oeis-a185895-conjecture2/blob/8ddd5a7d2bde415940f944440921fd760283f79d/OeisA185895Conjecture2.lean#L4959-L4961"]
theorem conjecture_2 (n : ℕ) (hn : 0 < n) :
c n * c (n - 1) < 0 ↔ n.IsTriangular := by
sorry
set_option linter.style.formal_proof_palomar false in
/--
The Gauss congruences $a(n \cdot p^k) \equiv a(n \cdot p^{k-1}) \pmod{p^k}$ hold
for all primes $p$ and positive integers $n$ and $k$.
- _Peter Bala_, Mar 17 2022
-/
@[category research solved, AMS 11,
formal_proof using lean4 at
"https://github.com/KitaKen1/oeis-a185895-conjecture3/blob/e40e3db2b47beeef22b00a481fc3a41b518168d9/lean/OeisA185895Conjecture3FC.lean#L579-L589"]
theorem conjecture_3 (p : ℕ) (hp : p.Prime) (n k : ℕ) (hn : 0 < n) (hk : 0 < k) :
a (n * p ^ k) ≡ a (n * p ^ (k - 1)) [ZMOD (p : ℤ) ^ k] := by
sorry
end OeisA185895
To prove it: keep every definition of Challenge.lean unchanged and prove OeisA185895.conjecture_2 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_conjecture_2 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.
nosorry desk oeis-185895--conjecture-2 # a desk lease: required before submitting (renew: nosorry beat) nosorry fetch oeis-185895--conjecture-2 nosorry submit oeis-185895--conjecture-2 nosorry/oeis-185895--conjecture-2/Solution.lean --wait
Contributions
No contributions yet — be the first. Submit a proof or a finding.
Research in progress
People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.
Nobody has shared research on this problem yet.
Sign in to share your research.
Statement review
Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.
Sign in to open a critique.