Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:A differential generating function · a_1

Source:OEIS conjectures
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Statement:

No informal statement.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.06492 [math.NT] · NS.06492v1 for this version
Declaration:OeisA397588.a_1
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:cbde5aaa1707e9b2b4206f84026ec56498fe1fe6a6b22a635e2f31c8c07cc553
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/397588.lean

Formal statement

theorem a_1 : a 1 = 1
Show the full Challenge.lean (124 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# A differential generating function

The generating function satisfies $A(x)=x+(xA(x)^2)'$. Its constant term is zero.
Seiichi Manyama's recurrence is $a(1)=1$ and
$a(n)=(n+1)\sum_{k=1}^{n-1}a(k)a(n-k)$ for $n>1$.

*References:*
- [A397588](https://oeis.org/A397588)
- [Li26] Wentao Li, [Parity and divisibility for A397588](https://github.com/VictorLiwentao/lean-oeis-proofs/blob/0a23974e54b90afd1453ef02c27cf8f617bad940/proofs/new-formalization/A397588/PROOF.md), 2026.
-/

@[expose] public section

namespace OeisA397588

/-- Manyama's coefficient recurrence, extended by $a(0)=0$. -/
def a : ℕ → ℕ
  | 0 => 0
  | 1 => 1
  | n + 2 =>
    (n + 3) * ∑ k ∈ (Finset.Icc 1 (n + 1)).attach, a k.1 * a (n + 2 - k.1)
termination_by n => n
decreasing_by
  · exact Nat.lt_succ_of_le (Finset.mem_Icc.mp k.2).2
  · exact Nat.sub_lt (Nat.succ_pos _) (Finset.mem_Icc.mp k.2).1

/-- The recurrence without attached membership proofs. -/
@[category API, AMS 11]
theorem a_succ_succ (n : ℕ) :
    a (n + 2) = (n + 3) * ∑ k ∈ Finset.Icc 1 (n + 1), a k * a (n + 2 - k) := by
  simp only [a]
  exact congrArg (fun t => (n + 3) * t)
    (Finset.sum_attach (Finset.Icc 1 (n + 1)) (fun k => a k * a (n + 2 - k)))

/-- Manyama's recurrence for every index greater than one. -/
@[category API, AMS 11]
theorem a_of_gt_one {n : ℕ} (hn : 1 < n) :
    a n = (n + 1) * ∑ k ∈ Finset.Icc 1 (n - 1), a k * a (n - k) := by
  cases n with
  | zero => omega
  | succ n =>
    cases n with
    | zero => omega
    | succ n => simp [a_succ_succ]

@[category test, AMS 11]
theorem a_0 : a 0 = 0 := by
  simp only [a]

@[category test, AMS 11]
theorem a_1 : a 1 = 1 := by
  simp only [a]

@[category test, AMS 11]
theorem a_2 : a 2 = 3 := by
  have hI : Finset.Icc (1 : ℕ) (2 - 1) = {1} := by decide
  rw [a_of_gt_one (by decide : 1 < 2), hI]
  norm_num [a_1]

@[category test, AMS 11]
theorem a_3 : a 3 = 24 := by
  have hI : Finset.Icc (1 : ℕ) (3 - 1) = {1, 2} := by decide
  rw [a_of_gt_one (by decide : 1 < 3), hI]
  norm_num [a_1, a_2]

@[category test, AMS 11]
theorem a_4 : a 4 = 285 := by
  have hI : Finset.Icc (1 : ℕ) (4 - 1) = {1, 2, 3} := by decide
  rw [a_of_gt_one (by decide : 1 < 4), hI]
  norm_num [a_1, a_2, a_3]

@[category test, AMS 11]
theorem a_5 : a 5 = 4284 := by
  have hI : Finset.Icc (1 : ℕ) (5 - 1) = {1, 2, 3, 4} := by decide
  rw [a_of_gt_one (by decide : 1 < 5), hI]
  norm_num [a_1, a_2, a_3, a_4]

set_option linter.style.formal_proof_palomar false in
/--
"Conjecture: $a(n)$ is odd iff $n$ is a power of $2$ for $n \ge 1$."
- Paul D. Hanna, Jul 03 2026.

Lean formalization by Wentao Li, with AI assistance; see [Li26].
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at "https://github.com/VictorLiwentao/lean-oeis-proofs/blob/0a23974e54b90afd1453ef02c27cf8f617bad940/LeanOeisProofs/NewFormalization/A397588.lean#L211"]
theorem conjecture_parity (n : ℕ) (hn : 1 ≤ n) :
    Odd (a n) ↔ ∃ k : ℕ, n = 2 ^ k := by
  sorry

set_option linter.style.formal_proof_palomar false in
/--
"$a(n)$ divisible by $3$ for $n > 1$."
- Paul D. Hanna, Jul 03 2026.

Lean formalization by Wentao Li, with AI assistance; see [Li26].
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at "https://github.com/VictorLiwentao/lean-oeis-proofs/blob/0a23974e54b90afd1453ef02c27cf8f617bad940/LeanOeisProofs/NewFormalization/A397588.lean#L325"]
theorem three_dvd_a (n : ℕ) (hn : 1 < n) : 3 ∣ a n := by
  sorry

end OeisA397588

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA397588.a_1 with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_a_1 : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry desk oeis-397588--a-1      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch oeis-397588--a-1
nosorry submit oeis-397588--a-1 nosorry/oeis-397588--a-1/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.