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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Sequence related to NOR bracketings · a_5

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.04718 [math.NT] · NS.04718v1 for this version
Declaration:OeisA112521.a_5
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:07bb3e750f6eeba89322956539e0b5925ab4f2d50d691a77e1a5cb34b240c97f
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/112521.lean

Formal statement

theorem a_5 : a 5 = 60
Show the full Challenge.lean (89 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Sequence related to NOR bracketings

$$a(n) = \sum_{j=0}^{n-1} (-1)^j \binom{2j}{j} \binom{2n-j-2}{n-j-1}$$

*References:*
- [A112521](https://oeis.org/A112521)
-/

@[expose] public section

namespace OeisA112521

open Nat Int Finset

/--
`a n` is the $n$-th term of the sequence related to NOR bracketings.
-/
def a (n : ℕ) : ℕ :=
  (∑ j ∈ range n,
    let c1 : ℕ := (2 * j).choose j
    let c2Top : ℕ := 2 * n - (j + 2)
    let c2Bot : ℕ := n - (j + 1)
    let c2 : ℕ := c2Top.choose c2Bot
    let termMagnitude : ℤ := c1 * c2

    if j % 2 = 0 then termMagnitude else -termMagnitude
  ).toNat

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

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

@[category test, AMS 11]
theorem a_2 : a 2 = 0 := by decide

@[category test, AMS 11]
theorem a_3 : a 3 = 6 := by decide

@[category test, AMS 11]
theorem a_4 : a 4 = 4 := by decide

@[category test, AMS 11]
theorem a_5 : a 5 = 60 := by decide

/--
`T n k` is the array defined as $T(1,1) = 1$, $T(i,j) = 0$ if $i<1$ or $j<1$,
$T(n,k) = T(n,k-2) + T(n,k-1) - 2 T(n-1,k-1) + T(n-1,k) + T(n-2,k)$.
-/
def T (n k : ℕ) : ℤ :=
  if n = 0 ∨ k = 0 then 0
  else if n = 1 ∧ k = 1 then 1
  else
    T n (k - 2) + T n (k - 1) - 2 * T (n - 1) (k - 1) + T (n - 1) k + T (n - 2) k
termination_by n + k

set_option linter.style.formal_proof_palomar false in
/--
Conjecture: Starting with $n=1$, $a(n)$ is the main diagonal of the array $T(n, k)$.
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at
    "https://github.com/KitaKen1/oeis-a112521-formal-conjectures/blob/d4ee80e997c20209a1f18b7b9aa3521150d5474d/lean/OeisA112521Proof.lean#L876-L885"]
theorem conjecture : ∀ (n : ℕ), n ≥ 1 → (a n : ℤ) = T n n := by
  sorry

end OeisA112521

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

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