How to Use
Enter n:
- Pentagonals: k(3k-1)/2 sequence
- Recurrence: p(n) computation
- Signs: +/- pattern
Partition Recurrence
p(n) = p(n-1)+p(n-2)−p(n-5)−p(n-7)+p(n-12)+p(n-15)−... Signs: +,+,−,−,+,+,−,−. Offsets: generalized pentagonal numbers. This gives O(n√n) computation of p(n), amazingly efficient!
Why It Works
The key insight: expanding Π(1-x^k) = (1-x)(1-x²)(1-x³)... and tracking which terms survive. Franklin's involution provides a beautiful bijective proof: most partition pairs cancel, leaving only pentagonal-indexed terms.
Step-by-Step Instructions
- 1Enter n.
- 2See pentagonal numbers.
- 3Use recurrence.
- 4Compute p(n).
- 5Verify signs.