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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:a(n)=3a(n−1)+a(n−2)−3a(n−3)a(n) = 3a(n-1) + a(n-2) - 3a(n-3)

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 current sequence contains primes, including 3,5,41,215233613, 5, 41, 21523361. Is there an (a,b,c)(a, b, c) weighted tribonacci sequence with a,b,ca, b, c relatively prime which is prime-free?

Yes: take (a,b,c)=(1,1,−1)(a, b, c) = (1, 1, -1) and the constant sequence x(n)=4x(n) = 4. The linked Lean proof is by Kenta Kitamura.

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

Formal statement

theorem conjecture :
    ∃ (a b c : ℤ) (x : ℕ → ℤ),
      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧
      IsWeightedTribonacci a b c x ∧
      ∀ n, ¬ (x n).natAbs.Prime
Show the full Challenge.lean (119 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# $a(n) = 3a(n-1) + a(n-2) - 3a(n-3)$

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

@[expose] public section

namespace OeisA103425

/--
The primary defining sequence `a`.
$a(n)$ is defined by the recurrence relation $a(n) = 3 a(n-1) + a(n-2) - 3 a(n-3)$
with initial terms $a(0)=1, a(1)=3, a(2)=5$.
-/
def a : ℕ → ℕ
  | 0 => 1
  | 1 => 3
  | 2 => 5
  | n + 3 => 3 * a (n + 2) + a (n + 1) - 3 * a n

/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/
@[category test, AMS 11]
theorem a_0 : a 0 = 1 := by decide

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

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

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

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

def IsWeightedTribonacci (a b c : ℤ) (x : ℕ → ℤ) : Prop :=
  ∀ n, x (n + 3) = a * x (n + 2) + b * x (n + 1) + c * x n

set_option linter.style.formal_proof_palomar false in
/--
The current sequence contains primes, including $3, 5, 41, 21523361$.
Is there an $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively prime
which is prime-free?

Yes: take $(a, b, c) = (1, 1, -1)$ and the constant sequence $x(n) = 4$.
The linked Lean proof is by Kenta Kitamura.
-/

@[category research solved, question, AMS 11,
  formal_proof using lean4 at
    "https://github.com/KitaKen1/oeis-a103425-prime-free/blob/b04b155/lean/OeisA103425FC.lean#L13-L35"]
theorem conjecture :
    ∃ (a b c : ℤ) (x : ℕ → ℤ),
      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧
      IsWeightedTribonacci a b c x ∧
      ∀ n, ¬ (x n).natAbs.Prime := by
  sorry

/--
Is there a non-constant $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively
prime which is prime-free?

Yes: take $(a, b, c) = (1, 1, -1)$ and $x(n) = 4(n + 1)$.
-/
@[category research solved, question, AMS 11]
theorem conjecture.variants.nonconstant :
    ∃ (a b c : ℤ) (x : ℕ → ℤ),
      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧
      IsWeightedTribonacci a b c x ∧
      (∃ m n, x m ≠ x n) ∧
      ∀ n, ¬ (x n).natAbs.Prime := by
  refine ⟨1, 1, -1, fun n ↦ 4 * (n + 1), by norm_num, fun n ↦ by push_cast; ring,
    ⟨0, 1, by norm_num⟩, fun n ↦ ?_⟩
  rw [show (4 * ((n : ℤ) + 1)).natAbs = 4 * (n + 1) by omega, Nat.prime_mul_iff]
  norm_num

/--
Is there a non-constant $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively
prime and pairwise distinct which is prime-free?

Yes: take $(a, b, c) = (3, -3, 1)$ and $x(n) = (n + 2)^2$.
-/
@[category research solved, question, AMS 11]
theorem conjecture.variants.nonconstant_distinct_coeffs :
    ∃ (a b c : ℤ) (x : ℕ → ℤ),
      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧
      a ≠ b ∧ a ≠ c ∧ b ≠ c ∧
      IsWeightedTribonacci a b c x ∧
      (∃ m n, x m ≠ x n) ∧
      ∀ n, ¬ (x n).natAbs.Prime := by
  refine ⟨3, -3, 1, fun n ↦ (n + 2) ^ 2, by norm_num, by norm_num, by norm_num, by norm_num,
    fun n ↦ by push_cast; ring, ⟨0, 1, by norm_num⟩, fun n ↦ ?_⟩
  rw [Int.natAbs_pow]
  exact Nat.Prime.not_prime_pow le_rfl

end OeisA103425

To prove it: keep every definition of Challenge.lean unchanged and prove OeisA103425.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-103425
nosorry submit oeis-103425 nosorry/oeis-103425/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.