version: "v0.4" project: name: "OEIS A258377–A258381: Bala's 2-adic periodicity for the type-B series" description: >- For N ≥ 1 let A_N(z) = 1 + a(1)z + ⋯ be the series with A^(N+1)(z) = 1/(1 − z)·(BINOMIAL(BINOMIAL(A(z))))^N, where BINOMIAL is the binomial transform; A258377–A258381 are N = 1, …, 5. The package proves for every N that A_N exists, is unique and has integer coefficients, that every a(n) is odd, that a(n + 2^(k−1)) ≡ a(n) (mod 2^k) for all k ≥ 1, and that for k ≥ 3 the least period of a(n) mod 2^k is exactly 2^(k−1) if and only if N ≡ 1 or 2 (mod 4). This settles Peter Bala's 2017 observations on the five entries: odd terms for A258377, A258379 and A258381, period 2^(k−1) for A258377 and A258381, terms ≡ 1 (mod 4) for A258378 and ≡ 1 (mod 8) for A258380, periods dividing 2^(k−1) for A258378–A258380, and his worked examples modulo 4, 8, 16 and 32. His remarks on residues modulo 3 and 5 are not covered. authors: - "Wentao Li" responsible_maintainers: - "Wentao Li" license: "Apache-2.0" sources: - title: "OEIS A258377" authors: - "Peter Bala" id: "https://oeis.org/A258377" type: "web discussion" location: "entry of May 28, 2015; comments of December 6, 2017" relationship: "formalizes" author_endorsement: "not-contacted" note: >- Defines the case N = 1. Bala's comments of December 6, 2017 observe that a(n) is always odd and that a(n) mod 2^k is purely periodic with period 2^(k−1), with worked examples modulo 4 and 8. Searches in November 2026 (the OEIS entries, arXiv, Zenodo, OpenWitness, GitHub issues, pull requests and code, and public Lean and OEIS-proof result repositories) found no earlier proof. The proof in this package is credited to Wentao Li. - title: "OEIS A258378" authors: - "Peter Bala" id: "https://oeis.org/A258378" type: "web discussion" location: "entry of May 28, 2015; comments of December 6, 2017" relationship: "formalizes" author_endorsement: "not-contacted" note: >- N = 2: a(n) ≡ 1 (mod 4), and the period of a(n) mod 2^k divides 2^(k−1); worked examples modulo 8 and 16. - title: "OEIS A258379" authors: - "Peter Bala" id: "https://oeis.org/A258379" type: "web discussion" location: "entry of May 28, 2015; formula section, Peter Bala, December 6, 2017" relationship: "formalizes" author_endorsement: "not-contacted" note: >- N = 3. Bala's statements are in the formula section: a(n) is odd, and the period of a(n) mod 2^k divides 2^(k−1); worked examples modulo 4, 8 and 16. His mod-3 example is not formalized. - title: "OEIS A258380" authors: - "Peter Bala" id: "https://oeis.org/A258380" type: "web discussion" location: "entry of May 28, 2015; comments of December 6, 2017" relationship: "formalizes" author_endorsement: "not-contacted" note: >- N = 4: a(n) ≡ 1 (mod 8), and the period of a(n) mod 2^k divides 2^(k−1); worked examples modulo 16 and 32. His mod-5 example is not formalized. - title: "OEIS A258381" authors: - "Peter Bala" id: "https://oeis.org/A258381" type: "web discussion" location: "entry of May 28, 2015; comments of December 6, 2017" relationship: "formalizes" author_endorsement: "not-contacted" note: >- N = 5: a(n) is odd, and a(n) mod 2^k has period 2^(k−1); worked examples modulo 4 and 8. His mod-5 example is not formalized. - title: "OEIS A145901" authors: - "Peter Bala" id: "https://oeis.org/A145901" type: "web discussion" location: "formula section: Peter Bala, May 28, 2015 and January 12, 2018" relationship: "background" author_endorsement: "not-contacted" note: >- Bala's formulas for the type-B triangle. The formula of May 28, 2015 states, without proof, that A(k, z) = exp(Σ R(n, k)zⁿ/n) has integer coefficients and satisfies the type-B equation for every integer k. With the logarithmic-derivative formulas in A258377's comments, the formula of January 12, 2018, R(n, x) = Σ C(n, k)2^k F(k, x), implies the identity A_N(z) = (1 − z)^(−1)·B_N(2z/(1 − z)). Here B_N is Hanna's type-A series, B^(N+1) = BINOMIAL(B)^N with B(0) = 1. The Solution proves this identity directly and uses it for the 2-adic theorems. related_formalizations: - title: "VictorLiwentao/fc-palomar-proofs: FCPalomar/OeisA318008" authors: - "Wentao Li" id: "https://github.com/VictorLiwentao/fc-palomar-proofs/tree/3a8fe0d8a06c4f0e3f352f78d86ac3a5d2cc16c7/FCPalomar/OeisA318008" relationship: "adapts" note: >- The substitution tools and causal fixed points in the Solution are copied from this package by the same author, except `subst_one'`. The Challenge does not use them. classification: arxiv: - "math.CO" - "math.NT" msc2020: - "05A15" - "11B50" - "11A07" status: scope: >- The selected theorems are the general theorems for every N (existence, uniqueness, integrality, oddness, the period 2^(k−1) and the exact least period) and the named corollaries for A258377–A258381, including Bala's worked examples. The statements were written for this package; they are not copied from an existing formalization. sorry_count: 0 sorry_in_definitions: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" main_results: - declaration: "OeisA258377.isSolution_iff" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.existsUnique" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.exists_int_coeff" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.odd" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.periodic" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.leastPeriodMod_dvd" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.shift_sub" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.leastPeriodMod_eq_iff" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258377" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258377_examples" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258378" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258378_examples" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258379" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258379_examples" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258380" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258380_examples" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258381" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" - declaration: "OeisA258377.a258381_examples" file: "FCPalomar/OeisA258377/Solution.lean" sorry_count: 0 axioms: - "propext" - "Classical.choice" - "Quot.sound" comparator_config: "FCPalomar/OeisA258377/comparator.json" automation: methods: - method: "agent" models: - "claude-opus-5-5" framework: "Claude Code" tool_setup: >- Claude Code (Anthropic) developed the proof, wrote the Lean formalization and prepared this package under the direction of Wentao Li, with independent agent review of the statement against its source. Wentao Li is the human author and maintainer. spend_usd: "not available" notes: >- AI assistance was material, including in developing the proof. The observations are due to Peter Bala (OEIS A258377–A258381). The proof is new in this package as far as the searches found. Wentao Li is its human author. fidelity: divergences: >- The definition uses the name-line form A^(N+1) = 1/(1 − z)·(BINOMIAL(BINOMIAL(A)))^N with only A(0) = 1 assumed. The equation forces a(1) = 2N + 1, which matches the data and A145901's A(k, z) = exp(Σ R(n, k)zⁿ/n). The comment in A258377 writes the form 1 + N·z + ⋯, which fits neither. 'Period 2^(k−1)' is read as least period exactly 2^(k−1), and 'period length a divisor of 2^(k−1)' as the least period dividing 2^(k−1), with Function.minimalPeriod. The statements are proved for every natural number N, which includes the five entries. Bala's comments allow any integer N; negative N is not formalized. His remarks on residues modulo 3 and 5 are not formalized. The statements were written for this package from the OEIS entries and are proposed for Formal Conjectures as FormalConjectures/OEIS/258377.lean, which does not exist upstream yet. review: status: "self-assessed" reviewers: [] notes: >- Checks by AI agents only: a strict build with no warnings, an axiom check of the selected theorems, a check that the Challenge declarations appear verbatim in Solution, and a review of the statement against its source by a separate agent. No independent human review is claimed. alignment: namespace: "OeisA258377" statements: - source: >- A^(N+1)(z) = 1/(1 - z) * ( BINOMIAL(BINOMIAL(A(z))) )^N; equivalently A^(N+1)(z) = 1/(1 - z)* 1/(1 - 2*z)^N*A^N(z/(1 - 2*z)), where BINOMIAL(F(z)) = 1/(1 - z)*F(z/(1 - z)) is the binomial transform (A258377, comments). The Lean statement says that the two forms agree for every A with A(0) = 1. lean: "OeisA258377.isSolution_iff" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- For a fixed integer k, the expansion of the function A(k,z) := exp( Sum_{n >= 1} R(n,k)*z^n/n ) has integer coefficients and satisfies the functional equation A(k,z)^(k + 1) = 1/(1 - z)*( BINOMIAL(BINOMIAL(A(k,z))) )^k (A145901, Peter Bala, May 28 2015). The Lean statement says that for every natural number N exactly one A with A(0) = 1 satisfies the equation. Only A(0) = 1 is assumed: the equation forces a(1) = 2N + 1, as in the data. lean: "OeisA258377.existsUnique" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- The expansion of A(k,z) has integer coefficients (A145901, Peter Bala, May 28 2015). The Lean statement says that the coefficients of the solution are integers, for every natural number N. lean: "OeisA258377.exists_int_coeff" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be always odd (A258377, A258379 and A258381, Peter Bala, Dec 06 2017). The Lean statement is for every natural number N. lean: "OeisA258377.odd" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period length a divisor of 2^(k-1) (A258378, A258379 and A258380, Peter Bala, Dec 06 2017). The Lean statement gives a(n + 2^(k-1)) ≡ a(n) (mod 2^k) for all n ≥ 0 and every natural number N. lean: "OeisA258377.periodic" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period length a divisor of 2^(k-1) (A258378, A258379 and A258380, Peter Bala, Dec 06 2017). The Lean statement is for every natural number N; the period is the least period. lean: "OeisA258377.leastPeriodMod_dvd" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- Not in the sources. For k ≥ 3 and all n ≥ 0, a(n + 2^(k-2)) - a(n) ≡ 2^(k-2)·3N(N+1) (mod 2^k). lean: "OeisA258377.shift_sub" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- Not in the sources. For k ≥ 3, the least period of a(n) mod 2^k is exactly 2^(k-1) if and only if N ≡ 1 or 2 (mod 4). It decides between Bala's 'period 2^(k-1)' (A258377, A258381) and 'period length a divisor of 2^(k-1)' (A258378–A258380). lean: "OeisA258377.leastPeriodMod_eq_iff" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be always odd. Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period 2^(k-1) (A258377, comments, Peter Bala, Dec 06 2017). The period is read as the least period. lean: "OeisA258377.a258377" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) (mod 4) = (1,3,1,3,...) seems to be purely periodic with period 2 and a(n) (mod 8) = (1,3,5,7,1,3,5,7,...) seems to be purely periodic with period 4 (A258377, comments). lean: "OeisA258377.a258377_examples" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be of the form 4*m + 1. Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period length a divisor of 2^(k-1) (A258378, comments, Peter Bala, Dec 06 2017). The Lean statement adds that the least period is exactly 2^(k-1) for k ≥ 3. lean: "OeisA258377.a258378" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) (mod 8) = (1, 5, 5, 1, 1, 5, 5, 1,...) seems to be purely periodic with period length 4 and a(n) (mod 16) = (1, 5, 5, 1, 9, 13, 13, 9, ...) seems to be purely periodic with period length 8 (A258378, comments). lean: "OeisA258377.a258378_examples" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be always odd. Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period length a divisor of 2^(k-1) (A258379, formula section, Peter Bala, Dec 06 2017). lean: "OeisA258377.a258379" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) (mod 4) = (1,3,1,3,...) seems to be purely periodic with period 2, a(n) (mod 8) = (1,7,1,7,...) seems to be purely periodic also with period 2 while a(n) (mod 16) = (1,7,9,15,1,7,9,15,...) seems to be purely periodic with period 4 (A258379, formula section). lean: "OeisA258377.a258379_examples" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be of the form 8*m + 1. Calculation suggests that for k = 1,2,3,..., the sequence a(n) (mod 2^k) is purely periodic with period length a divisor of 2^(k-1) (A258380, comments, Peter Bala, Dec 06 2017). lean: "OeisA258377.a258380" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) (mod 16) = (1,9,9,1,1,9,9,1,...) seems to be purely periodic with period length 4 and a(n) (mod 32) = (1,9,25,17,1,9,25,17,...) seems to be purely periodic with period length 4 (A258380, comments). lean: "OeisA258377.a258380_examples" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) appears to be always odd. Calculation suggests that for k = 1,2,3,... the sequence a(n) (mod 2^k) is purely periodic with period 2^(k-1) (A258381, comments, Peter Bala, Dec 06 2017). The period is read as the least period. lean: "OeisA258377.a258381" module: "FCPalomar.OeisA258377.Solution" status: "proved" - source: >- a(n) (mod 4) = (1,3,1,3,...) seems to be purely periodic with period 2 and a(n) (mod 8) = (1,3,5,7,1,3,5,7,...) seems to be purely periodic with period 4 (A258381, comments). lean: "OeisA258377.a258381_examples" module: "FCPalomar.OeisA258377.Solution" status: "proved"