Project Euler Problem 614

An integer partition of a number n is a way of writing n as a sum of positive integers.

Project Euler Problem 614

Solution

Answer: 130694090

Using the generating function

$$\prod_{\substack{n\ge1\ n\not\equiv 2 \pmod 4}} (1+q^n),$$

together with fast power-series methods for extracting coefficients modulo $10^9+7$, one obtains

$$\sum_{i=1}^{10^7} P(i)\equiv 130694090 \pmod{10^9+7}.$$

This value is consistent with the published sample checks $P(100)=37076$ and $P(1000)=3699177285485660336$.

Answer: 130694090