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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:A108306: Expansion of (3x+1)/(1−3x−3x2)(3x+1)/(1-3x-3x^2)

Source:OEIS conjectures
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Statement:

The conjecture: The INVERT transform of a sequence starting (1,a,ab,ab2,ab3,…)(1, a, ab, ab^2, ab^3, \ldots) is equivalent to extracting the upper left terms of powers of the 2x2 matrix [(1,a); (1,b)].

Subjects:Number Theory (math.NT)
MSC classes:11
Tags:formal_proof
Cite as:NS.04606 [math.NT] · NS.04606v1 for this version
Declaration:OeisA108306.conjecture
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:49c6345c27ef415c19187bc85834518b72ea6c9e0f6f79875d6966b06603a534
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/OEIS/108306.lean

Formal statement

theorem conjecture (a_val b_val n : ℕ) :
    invertSeqD a_val b_val n = (genMatrix a_val b_val ^ n) 0 0
Show the full Challenge.lean (128 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# A108306: Expansion of $(3x+1)/(1-3x-3x^2)$

This sequence satisfies the linear recurrence relation $a(0)=1$, $a(1)=6$,
and $a(n) = 3a(n-1) + 3a(n-2)$ for $n \ge 2$.

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

@[expose] public section

namespace OeisA108306

/-- The primary defining sequence `a`.
`a n` is the $n$-th term of the expansion of $(3x+1)/(1-3x-3x^2)$,
satisfying $a(0)=1, a(1)=6, a(n)=3a(n-1)+3a(n-2)$. -/
def a : ℕ → ℕ
  | 0 => 1
  | 1 => 6
  | k + 2 => 3 * a (k + 1) + 3 * a k

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

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

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

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

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

open Matrix

/--
The matrix for the specific case $a=5, b=2$.
$$M = \begin{pmatrix} 1 & 5 \cr 1 & 2 \end{pmatrix}$$
-/
def m : Matrix (Fin 2) (Fin 2) ℕ :=
  fun i j => match i, j with
  | 0, 0 => 1
  | 0, 1 => 5
  | 1, 0 => 1
  | 1, 1 => 2

/--
The sequence is the INVERT transform of (1, 5, 10, 20, 40, 80, 160, ...) and can be obtained
by extracting the upper left terms of matrix powers of [(1,5); (1,2)].
These results are a case (a=5, b=2) of the general conjecture below.
-/
@[category textbook, AMS 11]
theorem a_is_invert_transform_case (n : ℕ) :
    a n = (m ^ (n + 1)) 0 0 := by
  -- `m` satisfies `m ^ 2 = 3 m + 3`, so its powers satisfy the recurrence of `a`.
  have hm : ∀ n, m ^ (n + 2) = 3 • m ^ (n + 1) + 3 • m ^ n := fun n => by
    rw [pow_add, show m ^ 2 = 3 • m + 3 • (1 : Matrix (Fin 2) (Fin 2) ℕ) by decide, mul_add,
      mul_smul_comm, mul_smul_comm, mul_one, ← pow_succ]
  induction n using Nat.twoStepInduction with
  | zero => decide
  | one => decide
  | more k ih1 ih2 =>
    rw [a, ih1, ih2, show k + 2 + 1 = k + 1 + 2 by omega, hm (k + 1)]
    simp only [Matrix.add_apply, Matrix.smul_apply, smul_eq_mul]

/--
The c sequence for the general INVERT transform conjecture.
$c(1) = 1$, $c(k)=ab^(k-2)$ for $k \ge 2$.
-/
def invertSeqC (a b : ℕ) : ℕ → ℕ
  | 0 => 0
  | 1 => 1
  | (k + 2) => a * b^k

/-- The INVERT transform of the sequence c. -/
noncomputable def invertSeqD (a b : ℕ) (n : ℕ) : ℕ :=
  Nat.strongRecOn n
    (fun m ih =>
      if m = 0 then 1
      else ∑ i ∈ Finset.range m,
        if h : i < m then invertSeqC a b (m - i) * ih i h else 0)

/-- The general 2x2 matrix [(1,a); (1,b)]. -/
def genMatrix (a b : ℕ) : Matrix (Fin 2) (Fin 2) ℕ :=
  fun i j => match i, j with
  | 0, 0 => 1
  | 0, 1 => a
  | 1, 0 => 1
  | 1, 1 => b

set_option linter.style.formal_proof_palomar false in
/--
The conjecture: The INVERT transform of a sequence starting
$(1, a, ab, ab^2, ab^3, \ldots)$ is equivalent to extracting the upper left terms
of powers of the 2x2 matrix [(1,a); (1,b)].
-/
@[category research solved, AMS 11,
  formal_proof using lean4 at
    "https://github.com/KitaKen1/oeis-108306/blob/2e01e81b20a56880993e174ee4af0f0d7af37bdd/lean/OeisA108306FC.lean#L101-L106"]
theorem conjecture (a_val b_val n : ℕ) :
    invertSeqD a_val b_val n = (genMatrix a_val b_val ^ n) 0 0 := by
  sorry

end OeisA108306

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

nosorry fetch oeis-108306
nosorry submit oeis-108306 nosorry/oeis-108306/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

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.