{
  "id": "4494",
  "ident": "NS.04494",
  "slug": "oeis-103425",
  "title": "$a(n) = 3a(n-1) + a(n-2) - 3a(n-3)$",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "The current sequence contains primes, including $3, 5, 41, 21523361$.\nIs there an $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively prime\nwhich is prime-free?\n\nYes: take $(a, b, c) = (1, 1, -1)$ and the constant sequence $x(n) = 4$.\nThe linked Lean proof is by Kenta Kitamura.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "question",
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA103425.conjecture",
  "statement_lean": "theorem conjecture :\n    ∃ (a b c : ℤ) (x : ℕ → ℤ),\n      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧\n      IsWeightedTribonacci a b c x ∧\n      ∀ n, ¬ (x n).natAbs.Prime",
  "challenge_source": "/-\nCopyright 2026 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# $a(n) = 3a(n-1) + a(n-2) - 3a(n-3)$\n\n*References:*\n- [A103425](https://oeis.org/A103425)\n-/\n\n@[expose] public section\n\nnamespace OeisA103425\n\n/--\nThe primary defining sequence `a`.\n$a(n)$ is defined by the recurrence relation $a(n) = 3 a(n-1) + a(n-2) - 3 a(n-3)$\nwith initial terms $a(0)=1, a(1)=3, a(2)=5$.\n-/\ndef a : ℕ → ℕ\n  | 0 => 1\n  | 1 => 3\n  | 2 => 5\n  | n + 3 => 3 * a (n + 2) + a (n + 1) - 3 * a n\n\n/-- Term theorems verifying the first few values of the sequence against the official OEIS b-file -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by decide\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 3 := by decide\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 5 := by decide\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 15 := by decide\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 41 := by decide\n\ndef IsWeightedTribonacci (a b c : ℤ) (x : ℕ → ℤ) : Prop :=\n  ∀ n, x (n + 3) = a * x (n + 2) + b * x (n + 1) + c * x n\n\nset_option linter.style.formal_proof_palomar false in\n/--\nThe current sequence contains primes, including $3, 5, 41, 21523361$.\nIs there an $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively prime\nwhich is prime-free?\n\nYes: take $(a, b, c) = (1, 1, -1)$ and the constant sequence $x(n) = 4$.\nThe linked Lean proof is by Kenta Kitamura.\n-/\n\n@[category research solved, question, AMS 11,\n  formal_proof using lean4 at\n    \"https://github.com/KitaKen1/oeis-a103425-prime-free/blob/b04b155/lean/OeisA103425FC.lean#L13-L35\"]\ntheorem conjecture :\n    ∃ (a b c : ℤ) (x : ℕ → ℤ),\n      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧\n      IsWeightedTribonacci a b c x ∧\n      ∀ n, ¬ (x n).natAbs.Prime := by\n  sorry\n\n/--\nIs there a non-constant $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively\nprime which is prime-free?\n\nYes: take $(a, b, c) = (1, 1, -1)$ and $x(n) = 4(n + 1)$.\n-/\n@[category research solved, question, AMS 11]\ntheorem conjecture.variants.nonconstant :\n    ∃ (a b c : ℤ) (x : ℕ → ℤ),\n      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧\n      IsWeightedTribonacci a b c x ∧\n      (∃ m n, x m ≠ x n) ∧\n      ∀ n, ¬ (x n).natAbs.Prime := by\n  refine ⟨1, 1, -1, fun n ↦ 4 * (n + 1), by norm_num, fun n ↦ by push_cast; ring,\n    ⟨0, 1, by norm_num⟩, fun n ↦ ?_⟩\n  rw [show (4 * ((n : ℤ) + 1)).natAbs = 4 * (n + 1) by omega, Nat.prime_mul_iff]\n  norm_num\n\n/--\nIs there a non-constant $(a, b, c)$ weighted tribonacci sequence with $a, b, c$ relatively\nprime and pairwise distinct which is prime-free?\n\nYes: take $(a, b, c) = (3, -3, 1)$ and $x(n) = (n + 2)^2$.\n-/\n@[category research solved, question, AMS 11]\ntheorem conjecture.variants.nonconstant_distinct_coeffs :\n    ∃ (a b c : ℤ) (x : ℕ → ℤ),\n      Nat.gcd (Int.gcd a b) c.natAbs = 1 ∧\n      a ≠ b ∧ a ≠ c ∧ b ≠ c ∧\n      IsWeightedTribonacci a b c x ∧\n      (∃ m n, x m ≠ x n) ∧\n      ∀ n, ¬ (x n).natAbs.Prime := by\n  refine ⟨3, -3, 1, fun n ↦ (n + 2) ^ 2, by norm_num, by norm_num, by norm_num, by norm_num,\n    fun n ↦ by push_cast; ring, ⟨0, 1, by norm_num⟩, fun n ↦ ?_⟩\n  rw [Int.natAbs_pow]\n  exact Nat.Prime.not_prime_pow le_rfl\n\nend OeisA103425\n",
  "statement_hash": "7a718897abad9a0687fa22796d117f8fa5a9eaa36a2d8979064958f0d05b6cab",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}