Skip to content

A product of powers of one base, and a polynomial times k!, in closed form - #1550

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
power-products-and-factorial-sums
Sep 28, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
power-products-and-factorial-sums

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Two closed forms from Sullivan and Mackey's An Introduction to Proofs.

A product of powers of one base (MonomialProduct): product(c^(p(k)), k, a, b) is c raised to the sum of the exponents, where that sum closes. Prob 1.3.12's product(2^k, k, 0, n - 1) is 2^(n (n - 1)/2). The answer is piecewise over b >= a, and the empty product otherwise stays 1.

A polynomial times k! (FactorialSum, new): sum(P(k) k!, k, a, b) telescopes when P(k) k! is Q(k + 1) (k + 1)! - Q(k) k! for a polynomial Q. That holds exactly when (k + 1) Q(k + 1) - Q(k) = P(k). The equation fixes Q's coefficients from the top down, and its constant term is one extra condition that decides whether Q exists. Prob 2.7.17's sum(k k!, k, 1, n) is (n + 1)! - 1. The left factorial sum(k!, k, 0, n) has no such Q and stays as written.

Three pinned rows, in ClosedFormProductTest, SummationProductTest and ClosedFormSummationTest, used product(2^k) as a product with no closed form. They now use 2^sin(k).

Suite: 13,335 passed on net10.0. Its one failure was the third of those rows, which passes since it was moved. Every target framework builds. Gate: passed, with allocation as the baseline says on all 19 gated benchmarks.

BREAKING-CHANGES.md has the entry, beside the one for a polynomial times a power.

Part of #1409.

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

… form

product(c^(p(k)), k, a, b) is c to the sum of the exponents where that sum
closes, and the empty product keeps its 1: Prob 1.3.12's product(2^k, k,
0, n - 1) = 2^(n (n - 1)/2). A polynomial P(k) beside k! is summed where
P(k) k! telescopes as Q(k + 1) (k + 1)! - Q(k) k! for a polynomial Q, found
by one triangular solve whose constant term decides whether Q exists:
Prob 2.7.17's sum(k k!, k, 1, n) = (n + 1)! - 1, while the left factorial
sum(k!, k, 0, n) has no such Q and stays written. Of Sullivan and Mackey's
An Introduction to Proofs.

Part of #1409.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet
Rafael-SOWNet merged commit 77fe9bb into master Sep 28, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the power-products-and-factorial-sums branch October 29, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant