Randomized trial shows a formula for weak compositions in sequences, highlighting mathematical patterns.
We prove a conjecture of Peter Bala recorded in 2022 in the OEIS entry A348474. Let a(n) denote the number of weak compositions of n into exactly 2n parts, where every positive part in an odd position must be odd, while parts in even positions are unrestricted. Bala conjectured that a(n) = [xⁿ] Φ(x)ⁿ, where Φ(x) = (1 + x − x²) / ((1 + x)(1 − x)²). We establish this formula through a direct generating-function argument based on independent part-slots, and extend the method to arbitrary position-dependent restrictions that are periodic in the index. We also prove the consequences recorded by Bala: two double binomial expressions for a(n), an exponential relation with the lattice-path sequence A133656, and the Gauss congruences a(np^k) ≡ a(np^(k−1)) (mod p^k). In addition, we prove the functional equation for the generating function of A133656, which is recorded in the OEIS without proof or reference.
No takes yet. Share an insight, caveat, or question.
Rubaiyat Zaman Raisa (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: