# Ramanujan's formula for $\sum_{n = 0}^{\infty}p(7n + 5)q^{n}$

Analyzing the function $$f(-q) = (1 - q)(1 - q^{2})(1 - q^{3})\cdots$$ by replacing $q$ with $q^{1/5}$, Ramanujan is able to calculate the sum $$\sum_{n = 0}^{\infty}p(n)q^{n/5} = \frac{1}{f(-q^{1/5})}$$ where $p(n)$ is the number of partitions of $n$. Further, on equating coefficients of $q^{4/5}$ on both sides, he gets the beautiful result $$\sum_{n = 0}^{\infty}p(5n + 4)q^{n} = 5\frac{\{(1 - q^{5})(1 - q^{10})(1 - q^{15})\cdots\}^{5}}{\{(1 - q)(1 - q^{2})(1 - q^{3})\cdots\}^{6}}$$ which can be used to show \begin{aligned}p(5n + 4) &\equiv 0\pmod{5}\\p(25n + 24) &\equiv 0\pmod{25}\end{aligned} (this is shown in detail in my blog post).

Next Ramanujan mentions that the same technique can be applied by analyzing $$\sum_{n = 0}^{\infty}p(n)q^{n/7} = \frac{1}{f(-q^{1/7})}$$ and equating the coefficient of $q^{5/7},$ to get another beautiful identity $$\sum_{n = 0}^{\infty}p(7n + 5)q^{n} = 7\frac{\{(1 - q^{7})(1 - q^{14})(1 - q^{21})\cdots\}^{3}}{\{(1 - q)(1 - q^{2})(1 - q^{3})\cdots\}^{4}} + 49q\frac{\{(1 - q^{7})(1 - q^{14})(1 - q^{21})\cdots\}^{7}}{\{(1 - q)(1 - q^{2})(1 - q^{3})\cdots\}^{8}}$$ This can be used to prove the congruences \begin{aligned}p(7n + 5) &\equiv 0\pmod{7}\\p(49n + 47) &\equiv 0\pmod{49}\end{aligned} Unfortunately, in his characteristic style, Ramanujan omits the proof for the case of $f(-q^{1/7})$. I tried to use the approach mentioned by Ramanujan for $f(-q^{1/7})$ and was led to rather cumbersome expressions (multiplying three almost similar polynomials of 6 degrees each with symbolic coefficients). Needless to say, none of the online symbolic packages like wolfram alpha or sympy handle such complex symbolic manipulation. I guess that Ramanujan must have somehow simplified these calculations and thereby obtained a very simple-looking result.

Does anyone have any references for a simpler approach to establishing the identity concerning $\sum p(7n + 5)q^{n}$?

Update: To add more details, we use Euler's pentagonal formula $$f(-q^{1/7}) = \sum_{n = -\infty}^{\infty}(-1)^{n}(q^{1/7})^{n(3n + 1)/2}$$ The numbers $n(3n + 1)/2$ fall into one of the following four classes modulo $7$ as $n$ takes integer values: \begin{aligned}n(3n + 1)/2\,\,&\equiv 0\pmod{7}\text{ if } n &\equiv 0, 2\pmod{7}\\ &\equiv 1\pmod{7}\text{ if } n &\equiv 3, 6\pmod{7}\\ &\equiv 2\pmod{7}\text{ if } n &\equiv 1\pmod{7}\\ &\equiv 5\pmod{7}\text{ if } n &\equiv 4, 5\pmod{7}\end{aligned} and hence, if we put $r = q^{1/7}$, then we see that $$P = f(-r) = A_{0} + A_{1}r + A_{2}r^{2} + A_{3}r^{5}$$ where $A_{i}$ are power series in $q$ and do not involve any fractional powers of $q$. Further, if we replace $r = q^{1/7}$ by $r\zeta^{i}$ for $i = 1, 2, \ldots, 6$, where $\zeta$ is a primitive $7^{\text{th}}$ root of unity, then the product $Q = \prod_{i = 0}^{6}f(-r\zeta^{i})$ can be expressed without any fractional powers of $q$. In fact it is easy to show that $$Q = \prod_{i = 0}^{6}f(-r\zeta^{i}) = \frac{f^{8}(-q)}{f(-q^{7})}$$ The idea is then to find $Q/P = \prod_{i = 1}^{6}f(-r\zeta^{i})$, and we try to find the coefficient of $r^{5}$ in $Q/P$. Suppose that the coefficient is $R$. Then we have $$\sum_{n = 0}^{\infty}p(n)q^{n/7} = 1/P = (1/Q)(Q/P)$$ and hence $$\sum_{n = 0}^{\infty}p(7n + 5)q^{n} = R/Q$$ Further Update: I recently found a paper by Oddmund Kolberg titled "Some Identities Involving the Partition Function" which provides an elementary proof of Ramanujan's identity for $p(7n + 5)$. The same proof has been presented in my blog post.

• Is $p$ the partition function ? – mercio Jun 7 '14 at 11:08
• @mercio: yeah, $p(n)$ is the number of partitions of $n$. – Paramanand Singh Jun 7 '14 at 11:09

I have recommended this book before and I do it again here. If you want to learn about $q$-functions as Ramanujan used them, read this book.
It is less than US$35 on Amazon. • I do have this book. And the method I mention in the post is essentially the same as Berndt's book. But even he omits the calculation of coefficient of$r^{5}$and it is this part which is very tricky. However the identities he mentions relating$J_{1}, J_{2}, J_{3}$(here$A_{i}$'s) should be quite helpful in simplification. I will try to do the calculations and post them here if I succeed. – Paramanand Singh Jun 8 '14 at 4:25 Based on answer from @"marty cohen" I checked the book "Number Theory in the Spirit of Ramanujan" and found the proof of the identity concerning$\sum_{n = 0}^{\infty}p(7n + 5)q^{n}$. This proof is essentially following the same idea as I have provided in my post above. However Berndt omits the tedious calculation and gives the following warning: "Readers should not attempt to complete missing details but merely try to grasp the ideas behind Ramanujan's proof." Berndt also provides reference to a paper (Theorems on Partitions from a page in Ramanujan's lost notebook, J. Comp. Appl. Math. 160(2003), 53-68 see here) where full calculations are done. I also checked that paper and found that the most tedious parts of the calculation are done with MAPLE. While I don't have anything against doing tedious calculations via MAPLE, I strongly believe that using MAPLE one can only verify this identity of Ramanujan and not discover it. To provide more details, it is easy to establish that $$P = f(-r) = f(-q^{7})(A + Br - r^{2} + Cr^{5})\tag{1}$$ where$A, B, C$are powers series in$q$with no fractional exponents and they satisfy the equations $$ABC = -1, AB^{2} - A^{2} + qC = 0\tag{2}$$ We have then $$\frac{Q}{P} = f^{6}(-q^{7})\prod_{i = 1}^{6}(A + Br\zeta^{i} - r^{2}\zeta^{2i} + Cr^{5}\zeta^{5i})\tag{3}$$ I tried to calculate the product on right by clubbing terms with$i = 1, i = 6$together (and similarly club terms with$i = 2, i = 5$, and terms with$i = 3, i = 4$). Needless to say this generates 3 further polynomials which contain terms upto$r^{6}$(as we replace$r^{7}$with$q$and deal with higher powers of$r$in similar manner). But multiplying these three polynomials is a challenge if we don't use any software like MAPLE and I have been thoroughly unsuccessful in doing so by hand (even after many attempts). Suppose that even if we are able to get the final result (which will again be a polynomial in$r$with max degree$6$) then the coefficient of$r^{5}$in this polynomial will be a polynomial$f(A, B, C, q)$with integer coefficients. Ramanujan's great feat is to give a very simple form to$f(A, B, C, q)$using the relations$(2)$between$A, B, C, q\$ (this is even more strange if we take into account that Ramanujan did not have money to buy enough paper and he used to do all his calculations on a slate and store final results on paper). If this simple form is not known in advance then I wonder if packages like MAPLE will be ever able to find it.