{
  "id": "4407",
  "ident": "NS.04407",
  "slug": "oeis-100434--conjecture3",
  "title": "Expansion of g.f. $(1+x)(3+x)/(1+6x^2+x^4)$ · conjecture3",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "**Conjecture from Creighton Dement (A100434)**:\nLet the auxiliary sequences c, d, e, f, g, b be defined as specified.\nThen for all $n \\ge 0$, $g(n) + a(n) = b(n)$.\n\n**Proof outline**:\nstrong two-step induction on the paired recurrences. The even/odd cases are coupled\nthrough closed identities between consecutive terms of the relevant pair of sequences\n(here $g, a$), and the induction step is discharged by `rfl`-level unfolding of the definitions\nplus linear arithmetic. (Numerically verified for $n < 600$ before formalization.)",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA100434.conjecture3",
  "statement_lean": "theorem conjecture3 (n : ℕ) : g n + a n = b n",
  "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# Expansion of g.f. $(1+x)(3+x)/(1+6x^2+x^4)$\n\nThis sequence is defined by the linear recurrence relation\n$a(n) = -6 a(n-2) - a(n-4)$ for $n \\ge 4$,\nwith initial values $a(0)=3$, $a(1)=4$, $a(2)=-17$, $a(3)=-24$.\n\n*References:*\n- [A100434](https://oeis.org/A100434)\n-/\n\n@[expose] public section\n\nnamespace OeisA100434\n\n/-- The primary defining sequence `a`, which is the expansion of the generating function\n$(1+x)(3+x)/(1+6x^2+x^4)$. It satisfies the recurrence $a(n) = -6 a(n-2) - a(n-4)$\nfor $n \\ge 4$. -/\ndef a : ℕ → ℤ\n  | 0 => 3\n  | 1 => 4\n  | 2 => -17\n  | 3 => -24\n  | n + 4 => -6 * a (n + 2) - a n\n\n/-- $c(n)$ starts with $(1, -3, -7, 17)$ and satisfies the same recurrence as `a` -/\ndef c : ℕ → ℤ\n  | 0 => 1\n  | 1 => -3\n  | 2 => -7\n  | 3 => 17\n  | n + 4 => -6 * c (n + 2) - c n\n\n/-- $d(n)$ starts with $(2, 4, -10, -24)$ and satisfies the same recurrence as `a` -/\ndef d : ℕ → ℤ\n  | 0 => 2\n  | 1 => 4\n  | 2 => -10\n  | 3 => -24\n  | n + 4 => -6 * d (n + 2) - d n\n\n/-- $b(2n) = -c(2n+1)$, $b(2n+1) = c(2n)$ -/\n-- Sign corrected (even branch): see https://github.com/google-deepmind/formal-conjectures/issues/5025\ndef b (n : ℕ) : ℤ :=\n  if n % 2 = 0 then -c (n + 1)\n  else c (n - 1)\n\n/-- $e(2n) = d(2n)/2$, $e(2n+1) = - d(2n)/2$ -/\ndef e (n : ℕ) : ℤ :=\n  if n % 2 = 0 then\n    d n / 2\n  else\n    -- n is positive, so n-1 is safe in ℕ\n    - (d (n - 1) / 2)\n\n/-- $f(2n) = f(2n+1) = d(2n+1)/2$ -/\ndef f (n : ℕ) : ℤ :=\n  let m := n / 2\n  d (2 * m + 1) / 2\n\n/-- $g(2n) = 0, g(2n+1) = c(2n+1)$ -/\ndef g (n : ℕ) : ℤ :=\n  if n % 2 = 0 then 0\n  else c n\n\n/-- Value of the sequence `a` at 0. -/\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 3 := by rfl\n\n/-- Value of the sequence `a` at 1. -/\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 4 := by rfl\n\n/-- Value of the sequence `a` at 2. -/\n@[category test, AMS 11]\ntheorem a_2 : a 2 = -17 := by rfl\n\n/-- Value of the sequence `a` at 3. -/\n@[category test, AMS 11]\ntheorem a_3 : a 3 = -24 := by rfl\n\n/-- Value of the sequence `a` at 4. -/\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 99 := by rfl\n\n/--\nFor all $n \\ge 0$, we have $a(2n) = - c(2n+1)$.\n-/\n@[category textbook, AMS 11]\ntheorem a_even (n : ℕ) : a (2 * n) = - c (2 * n + 1) := by\n  induction n using Nat.twoStepInduction with\n  | zero =>\n    rfl\n  | one =>\n    rfl\n  | more k ih1 ih2 =>\n    have h_eq : 2 * (k + 2) = 2 * k + 4 := by omega\n    have h_eq2 : 2 * (k + 2) + 1 = 2 * k + 5 := by omega\n    rw [h_eq2, h_eq]\n    have h_lhs : a (2 * k + 4) = -6 * a (2 * k + 2) - a (2 * k) := by rfl\n    have h_rhs : c (2 * k + 5) = -6 * c (2 * k + 3) - c (2 * k + 1) := by rfl\n    rw [h_lhs, h_rhs]\n    have ih2' : a (2 * k + 2) = - c (2 * k + 3) := by\n      have h_eq_ih : 2 * (k + 1) = 2 * k + 2 := by omega\n      have h_eq2_ih : 2 * (k + 1) + 1 = 2 * k + 3 := by omega\n      rw [← h_eq2_ih, ← h_eq_ih]\n      exact ih2\n    rw [ih1, ih2']\n    ring\n\n/--\nFor all $n \\ge 0$, we have $a(2n+1) = d(2n+1)$.\n-/\n@[category textbook, AMS 11]\ntheorem a_odd (n : ℕ) : a (2 * n + 1) = d (2 * n + 1) := by\n  induction n using Nat.twoStepInduction with\n  | zero =>\n    rfl\n  | one =>\n    rfl\n  | more k ih1 ih2 =>\n    have h_eq : 2 * (k + 2) + 1 = 2 * k + 5 := by omega\n    rw [h_eq]\n    have h_lhs : a (2 * k + 5) = -6 * a (2 * k + 3) - a (2 * k + 1) := by rfl\n    have h_rhs : d (2 * k + 5) = -6 * d (2 * k + 3) - d (2 * k + 1) := by rfl\n    rw [h_lhs, h_rhs]\n    have ih2' : a (2 * k + 3) = d (2 * k + 3) := by\n      have h_eq_ih : 2 * (k + 1) + 1 = 2 * k + 3 := by omega\n      rw [← h_eq_ih]\n      exact ih2\n    rw [ih1, ih2']\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Conjecture from Creighton Dement (A100434)**:\nLet the auxiliary sequences c, d, e, f, g, b be defined as specified.\nThen for all $n \\ge 0$, $c(n) + d(n) = b(n)$.\n\n**Proof outline**:\nstrong two-step induction on the paired recurrences. The even/odd cases are coupled\nthrough closed identities between consecutive terms of the relevant pair of sequences\n(here $c, d$), and the induction step is discharged by `rfl`-level unfolding of the definitions\nplus linear arithmetic. (Numerically verified for $n < 600$ before formalization.)\n-/\n@[category research solved, AMS 11, formal_proof using formal_conjectures at\n\"https://github.com/chy4pro/formal-conjectures/blob/32f88077a444b83741f1db6734390eebd3678ecf/FormalConjectures/OEIS/100434.lean#L287\"]\ntheorem conjecture1 (n : ℕ) : c n + d n = b n := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Conjecture from Creighton Dement (A100434)**:\nLet the auxiliary sequences c, d, e, f, g, b be defined as specified.\nThen for all $n \\ge 0$, $e(n) + f(n) = b(n)$.\n\n**Proof outline**:\nstrong two-step induction on the paired recurrences. The even/odd cases are coupled\nthrough closed identities between consecutive terms of the relevant pair of sequences\n(here $e, f$), and the induction step is discharged by `rfl`-level unfolding of the definitions\nplus linear arithmetic. (Numerically verified for $n < 600$ before formalization.)\n-/\n@[category research solved, AMS 11, formal_proof using formal_conjectures at\n\"https://github.com/chy4pro/formal-conjectures/blob/32f88077a444b83741f1db6734390eebd3678ecf/FormalConjectures/OEIS/100434.lean#L306\"]\ntheorem conjecture2 (n : ℕ) : e n + f n = b n := by\n  sorry\n\nset_option linter.style.formal_proof_palomar false in\n/--\n**Conjecture from Creighton Dement (A100434)**:\nLet the auxiliary sequences c, d, e, f, g, b be defined as specified.\nThen for all $n \\ge 0$, $g(n) + a(n) = b(n)$.\n\n**Proof outline**:\nstrong two-step induction on the paired recurrences. The even/odd cases are coupled\nthrough closed identities between consecutive terms of the relevant pair of sequences\n(here $g, a$), and the induction step is discharged by `rfl`-level unfolding of the definitions\nplus linear arithmetic. (Numerically verified for $n < 600$ before formalization.)\n-/\n@[category research solved, AMS 11, formal_proof using formal_conjectures at\n\"https://github.com/chy4pro/formal-conjectures/blob/32f88077a444b83741f1db6734390eebd3678ecf/FormalConjectures/OEIS/100434.lean#L335\"]\ntheorem conjecture3 (n : ℕ) : g n + a n = b n := by\n  sorry\n\nend OeisA100434\n",
  "statement_hash": "173217cba8c65b926544cd980d288995b1101f02a27fb4222a38209a05acf31e",
  "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."
}