Statements and proofs
Write with as in the previous chapter. The rising product is when .
For all , is integral. For every prime , . For with , if and only if is not prime; . The quotient is integral in every row for and primes ; at it is integral exactly when is even. Every integral quotient is modulo .
Original Sections 2–3. The coefficient sum gives integrality and reduces modulo to . Wilson and Fermat give the prime case. The factorial lemma below handles composites; is immediate, and the last term at is . Modulo only the next-to-last term can survive, giving . The divisor is at ; for the factorial lemma applies. At and the residues are modulo and modulo , respectively. Multiply an integral quotient back by to read off its residue .
Public frozen Lean theorems cover the integer witness, prime residue, divisibility away from , and the even-row quotient. That last declaration does not cover odd rows: the odd-row failures at , successes at , and the residue at column are not statements of those public theorems.
If is composite and , then . Write with . If , both factors occur in the factorial. If , then , and the distinct factors occur and multiply to . The same lemma is already proved as an internal helper in the frozen implementation, not exposed as a public result.
For every , the polynomial of degree at most interpolating for is , so it gives the column at every . For , the explicit polynomial is
Original Section 4. Substitute into the coefficient sum to obtain . Only reaches degree , with leading coefficient . Set . Two polynomials of degree at most that agree at distinct points have zero difference. This is the interpolation used in A355259.
Rows are A029767, A103213, A355171, A355372, A355407 and A355414 respectively, by their generating functions . They inherit the prime residue and divisibility criterion; every prime quotient is integral in rows , and precisely fail in rows . For , row zero is because only contributes. The labels identify the source sequences rather than create new proof obligations.
For , . Set . For , , and
Original Section 4. Expand as and take coefficients for the alternate sum. The identities and give the difference and exponential generating function by coefficient comparison and differentiation. First use nonnegative integer , then extend because every coefficient is polynomial in .
Fix and let . Then and for ,
For ,
Original Section 5. In the differential identity , take the coefficient and multiply by for the first recurrence. Apply first to kill the right side and take the coefficient of for the second. Rows specialize to the recurrences credited to Mathar, Israel, Tebni and Mathar, respectively.
For every fixed , as : the ratio tends to . The cases match the OEIS formulas of Alcover and Kotesovec, respectively.
Original Section 5. Row zero follows from its closed form. For , divide the coefficient sum by and put . The summand is . For , it is bounded by the summable sequence and tends termwise to . The other half is bounded in total by a constant times , which tends to zero. Thus the limit is .
For and , is integral. For , ; for prime , . Every composite divides its entry; a prime divides its entry exactly when ; divides its entry exactly when is odd. The prime quotient is integral if , or is odd; when is even and it is integral exactly when is even. Every integral quotient is modulo .
Original Section 5. For , is still integral, and . Replace by in the coefficient sum. The last term modulo , Wilson and Fermat give divisibility, with at column . The next-to-last term modulo gives at and at ; is automatic and uses the factorial lemma. Multiply back by to obtain the residue of any integral quotient.
A355258 is . For the formulas of Kotesovec and Meya are, respectively,
Original Section 5. Multiply by to get , then substitute the row-zero formula. Alternatively take coefficients of ; the term vanishes at and setting gives the binomial sum.