/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import FormalConjecturesUtilA compositional generating function
The ordinary generating function satisfies $A(xA(x)-3xA(x)^2)=x^2$, with $A(0)=0$ and $a(1)=1$. Its coefficients form OEIS A396843.
References:
A396843, Paul D. Hanna, 2026.
ElonSG / the-omega-institute/trureturing, Earlier Lean proof.
[Li26] Wentao Li, Integral construction and oddness, 2026.
@[expose] public sectionnamespace OeisA396843open PowerSeriesThe normalized ordinary generating-function equation defining OEIS A396843.
def SourceEquation (A : PowerSeries ℤ) : Prop :=
constantCoeff A = 0 ∧ coeff 1 A = 1 ∧
A.subst (X * A - 3 * X * A ^ 2) = X ^ 2The normalized generating series of OEIS A396843.
noncomputable def series : PowerSeries ℤ := Classical.epsilon SourceEquationOEIS A396843, extended by $a(0)=0$ outside its offset-one domain.
noncomputable def a (n : ℕ) : ℤ := coeff n seriesThe defining equation has a unique normalized integral solution; see [Li26].
@[category API, AMS 11 13,
formal_proof using lean4 at "https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000016"]
theorem source_existence : ∃! A : PowerSeries ℤ, SourceEquation A := ⊢ ∃! A, SourceEquation A
All goals completed! 🐙The selected series satisfies the defining equation and normalization.
@[category API, AMS 11 13]
theorem series_spec : SourceEquation series :=
Classical.epsilon_spec source_existence.exists@[category test, AMS 11]
theorem a_0 : a 0 = 0 := ⊢ a 0 = 0
All goals completed! 🐙@[category test, AMS 11]
theorem a_1 : a 1 = 1 := series_spec.2.1@[category test, AMS 11]
theorem a_2 : a 2 = 3 := ⊢ a 2 = 3
All goals completed! 🐙@[category test, AMS 11]
theorem a_3 : a 3 = 15 := ⊢ a 3 = 15
All goals completed! 🐙@[category test, AMS 11]
theorem a_4 : a 4 = 117 := ⊢ a 4 = 117
All goals completed! 🐙@[category test, AMS 11]
theorem a_5 : a 5 = 975 := ⊢ a 5 = 975
All goals completed! 🐙"Conjecture: all terms are odd."
Paul D. Hanna, Jul 01 2026.
An earlier Lean parity proof appears in the-omega-institute/trureturing PR #6773.
Wentao Li's formalization also proves integral existence and uniqueness; see [Li26].
AI assistance was used for development and verification.
@[category research solved, AMS 11,
formal_proof using lean4 at "https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-13-000016"]
theorem conjecture (n : ℕ) (hn : 1 ≤ n) : Odd (a n) := n:ℕhn:1 ≤ n⊢ Odd (a n)
All goals completed! 🐙end OeisA396843