Recurrence relation for partition function for pentagonal numbers.

I know the following theorems.

Theorem 1 $$:$$ For $$|x|<1$$ we have $$\prod\limits_{k=1}^{\infty} \frac {1} {1-x^k} = 1 + \sum\limits_{k=1}^{\infty} p(k)x^k.$$

Theorem 2 $$:$$ For $$|x|<1$$ we have $$\prod\limits_{m=1}^{\infty} (1-x^m) = 1 + \sum\limits_{m=1}^{\infty} (-1)^m\left \{x^{\omega (m)} + x^{\omega(-m)} \right \}.$$

where $$\omega (n) = \frac {3n^2-n} {2},\ n \in \Bbb Z$$ are called pentagonal numbers.

By the above two theorems we get $$\left (1+\sum\limits_{m=1}^{\infty} (-1)^m\left \{x^{\omega (m)} + x^{\omega(-m)} \right \} \right ) \left ( 1+\sum\limits_{k=1}^{\infty} p(k)x^k \right ) = \left ( \prod\limits_{m=1}^{\infty} (1-x^m) \right ) \left ( \prod\limits_{k=1}^{\infty} \frac {1} {1-x^k} \right ) = 1.$$ This shows that

$$\sum\limits_{k=1}^{\infty} p(k)x^k + \sum\limits_{m=1}^{\infty} (-1)^m\left \{x^{\omega (m)} + x^{\omega(-m)} \right \} + \left ( \sum\limits_{m=1}^{\infty} (-1)^m\left \{x^{\omega (m)} + x^{\omega(-m)} \right \} \right ) \left ( \sum\limits_{k=1}^{\infty} p(k)x^k \right ) = 0.$$

Now if $$n \geq 1$$ be such that $$n$$ is not a pentagonal number then there will be no term involving $$x^n$$ in the infinite sum $$\sum\limits_{m=1}^{\infty}(-1)^m \left \{x^{\omega (m)} + x^{\omega(-m)} \right \}.$$ Hence by equating the coefficient of $$x^n$$ to $$0$$ we get $$p(n) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) + \cdots = 0.$$ But if $$n$$ is a pentagonal number then there is a term involving $$x^n$$ in the infinite sum $$\sum\limits_{m=1}^{\infty} (-1)^m\left \{x^{\omega (m)} + x^{\omega(-m)} \right \}$$ with coefficient $$+1$$ or $$-1.$$ Hence in that case we get $$p(n) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) + \cdots = 1\ \text {or}\ -1.$$ Am I right? But in my book the recurrence relations are given same for both the pentagonal numbers and non pentagonal numbers? Where am I doing mistake? Can anybody please point it out?

Thank you very much for your valuable time.

• Your $\sum_k p\left(k\right) x^k$ sum is missing its $k = 0$ addend, which would contribute a $p\left(0\right) = 1$ precisely when $n$ is a pentagonal number (thus making the two cases uniform). – darij grinberg May 7 at 16:43
• @darji grinberg I don't get your point. Can you please be more explicit? – math maniac. May 7 at 16:45
• You've forgotten a factor of $(-1)^m$ in Theorem 2. – Lord Shark the Unknown May 7 at 16:46
• The sum $p(n) - p(n-1) - p(n-2) + p(n-5) + p(n-7) - p(n-12) - p(n-15) + \cdots$ will contain a $p(0) = 1$ addend exactly when $n$ is a pentagonal number. But this addend does not arise when you compare coefficients in your equality. (I suggest using \label and \tag, by the way; then I could refer to your equalities more easily.) – darij grinberg May 7 at 16:46
• Yeah now I have understood what you are trying to say. Good point @darji grinberg. Thank you very much for your kind help. – math maniac. May 7 at 16:54