{
  "id": "6357",
  "ident": "NS.06357",
  "slug": "oeis-368630",
  "title": "A self-compositional exponential generating function",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "For every $n \\ge 0$, \"a(n) == 1 (mod 3)\".\n- Paul D. Hanna, Jan 02 2024.\n\nProved by Wentao Li with OpenAI Codex assistance; see [Li26].",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [
    "formal_proof"
  ],
  "collection": "oeis",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "OeisA368630.conjecture_mod_three",
  "statement_lean": "theorem conjecture_mod_three (n : ℕ) : a n % 3 = 1",
  "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 self-compositional exponential generating function\n\nThe normalized exponential generating function of OEIS A368630 satisfies\n$A(x/A(x)^2)=\\exp(xA(x))$, with $A(0)=1$.\n\n*References:*\n- [A368630](https://oeis.org/A368630), Paul D. Hanna, 2024.\n- [Li26] Wentao Li, [Congruences of the exponential generating sequence](https://github.com/VictorLiwentao/lean-oeis-proofs/blob/e0e499973c3398f08ed91b39618f1948fe1804a5/proofs/new-proofs/A368630/PROOF.md), 2026.\n-/\n\n@[expose] public section\n\nnamespace OeisA368630\nopen PowerSeries\n\n/-- The rational exponential generating series of an integer sequence. -/\nnoncomputable def egf (a : ℕ → ℤ) : ℚ⟦X⟧ :=\n  PowerSeries.mk fun n => (a n : ℚ) / n.factorial\n\n/-- The defining equation for the integer EGF coefficients of OEIS A368630. -/\ndef IsGeneratingSequence (c : ℕ → ℤ) : Prop :=\n  (egf c).constantCoeff = 1 ∧\n    (egf c).subst (X * ((egf c)⁻¹) ^ 2) = (exp ℚ).subst (X * egf c)\n\n/-- The integer coefficients of the normalized exponential generating function. -/\nnoncomputable def a : ℕ → ℤ := Classical.epsilon IsGeneratingSequence\n\n/-- The original equation defines a unique integer coefficient sequence; see [Li26]. -/\n@[category API, AMS 11 13,\n  formal_proof using lean4 at \"https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000013\"]\ntheorem exists_unique_sequence : ∃! c : ℕ → ℤ, IsGeneratingSequence c := by\n  sorry\n\n/-- The selected sequence satisfies the defining equation. -/\n@[category API, AMS 11 13]\ntheorem a_spec : IsGeneratingSequence a :=\n  Classical.epsilon_spec exists_unique_sequence.exists\n\n@[category test, AMS 11]\ntheorem a_0 : a 0 = 1 := by\n  have h := a_spec.1\n  norm_num [egf] at h\n  exact_mod_cast h\n\n@[category test, AMS 11]\ntheorem a_1 : a 1 = 1 := by\n  sorry\n\n@[category test, AMS 11]\ntheorem a_2 : a 2 = 7 := by\n  sorry\n\n@[category test, AMS 11]\ntheorem a_3 : a 3 = 136 := by\n  sorry\n\n@[category test, AMS 11]\ntheorem a_4 : a 4 = 4933 := by\n  sorry\n\n/--\nFor every $n \\ge 0$, \"a(n) == 1 (mod 3)\".\n- Paul D. Hanna, Jan 02 2024.\n\nProved by Wentao Li with OpenAI Codex assistance; see [Li26].\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000013\"]\ntheorem conjecture_mod_three (n : ℕ) : a n % 3 = 1 := by\n  sorry\n\n/--\nFor every $n \\ge 0$, \"a(2*n) == 1 (mod 2)\".\n- Paul D. Hanna, Jan 02 2024.\n\nProved by Wentao Li with OpenAI Codex assistance; see [Li26].\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000013\"]\ntheorem conjecture_even (n : ℕ) : a (2 * n) % 2 = 1 := by\n  sorry\n\n/--\nFor every $n \\ge 1$, \"a(2*n+1) == 0 (mod 2)\". The term $a(1)=1$ is excluded.\n- Paul D. Hanna, Jan 02 2024.\n\nProved by Wentao Li with OpenAI Codex assistance; see [Li26].\n-/\n@[category research solved, AMS 11,\n  formal_proof using lean4 at \"https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000013\"]\ntheorem conjecture_odd (n : ℕ) (hn : 1 ≤ n) : a (2 * n + 1) % 2 = 0 := by\n  sorry\n\nend OeisA368630\n",
  "statement_hash": "03bf4d21e5cfdd74e8fe20489f207e4a3ab294598272bd633f104437115ffa42",
  "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."
}