# Ramanujan congruence mod 7

Hello I am trying to prove this congruence:

$$P(7n+5)\equiv 0 \pmod{7}$$

In order to do that I have done the next thing:

We have that

$$\displaystyle\sum_{n\geq0}\;P(n)q^{n}=\frac{1}{(q;q)_{\infty}}$$

we multiply by $$q^{2}$$ then

$$\begin{eqnarray} \displaystyle\sum_{n\geq0}\;P(n)q^{n+2}&=&\frac{q^{2}}{(q;q)_{\infty}}\\ &=& \frac{q^{2}((q;q)^{3}_{\infty})^{2}}{(q;q)_{\infty}^{7}} \end{eqnarray}$$

Therefore the coefficient of $$q^{7n+7}$$ in the LHS is $$P(7n+5)$$ therefore we have to check that the coefficient of $$q^{7n+7}$$ of $$\frac{q^{2}((q;q)^{3}_{\infty})^{2}}{(q;q)_{\infty}^{7}}$$ is $$\equiv 0(mod \; 7)$$.

Now we have that $$(q;q)^{3}_{\infty}=\displaystyle\sum_{n\geq0} (-1)^{n}(2n+1)q^{\frac{n(n+1)}{2}}$$, therefore

$$\begin{eqnarray} q^{2}((q;q)^{3}_{\infty})^{2}&=&(q(q;q)^{3}_{\infty})^{2}\\ &=& \displaystyle \sum_{n,m \geq0} (-1)^{n}(2n+1)(2m+1)q^{\frac{n(n+1)}{2}+\frac{m(m+1)}{2}+2} \end{eqnarray}$$

Now we will check when $$\frac{n(n+1)}{2}+\frac{m(m+1)}{2}+2$$ is a mutiply of $$7$$

Note that $$(2n+1)^{2}+(2m+1)^{2}=8\left(\frac{n(n+1)}{2}+\frac{m(m+1)}{2}+2\right)-14$$

Then $$\frac{n(n+1)}{2}+\frac{m(m+1)}{2}+2\equiv 0(mod\;7)$$ if and only if $$(2n+1)^{2}+(2m+1)^{2}\equiv0(mod \;7)$$ only if $$(2n+1)^{2}\equiv0(mod \;7)$$ and $$(2m+1)^{2}\equiv0(mod \;7)$$ Then $$2n+1\equiv0(mod \;7)$$ and $$2m+1\equiv0(mod \;7)$$.

Therefore the coefficient of $$q^{7n+7}$$ in $$q^{2}((q;q)^{3}_{\infty})^{2}$$ is is multiple of 7.

I do not know if that is correct this idea and also I do not know how to do it for $$\frac{1}{(q;q)^{7}_{\infty}}$$. I think I can use $$\frac{1}{(1-q)^{7}}\equiv \frac{1}{1-q^{7}}(mod\;7)$$ so that I can have $$\frac{1}{(q;q)^{7}_{\infty}}\equiv\frac{1}{(q^{7};q^{7})_{\infty}}(mod\; 7 )$$

But I do not know how to procede with this. I woud appreciate any hint you can give me.

Thank you for your time!

• To be clear: you're satisfied with your proof that $$[q^{7n+7}]q^{2}((q;q)^{3}_{\infty})^{2} \equiv 0 \pmod 7$$ and you want to show that $$[q^{7n+7}]\frac{q^{2}((q;q)^{3}_{\infty})^{2}}{(q^{7};q^{7})_{\infty}} \equiv 0 \pmod 7$$? – Peter Taylor Dec 5 '18 at 16:33
• Of course but I do not know how to finish it! – Liddo Dec 5 '18 at 16:53
• It is of interest to know that Ramanujan proved this congruence using the same method. He provided another more complicated proof by giving a closed form for $\sum_{n=0}^{\infty} p(7n+5)q^n$. See this post for more details. – Paramanand Singh Dec 6 '18 at 17:13

I think the bit you're missing is $$\frac{1}{1 - z} = 1 + z + z^2 + \cdots$$ Therefore $$\frac{1}{(q^7;q^7)_\infty} = \prod_{k=1}^\infty \sum_{j=0}^\infty q^{7jk}$$ which clearly only has non-zero coefficients for powers of seven.
Thus the coefficient $$[q^{7n+7}]\frac{q^{2}((q;q)^{3}_{\infty})^{2}}{(q^{7};q^{7})_{\infty}}$$ is some integer-weighted sum* of coefficients $$[q^{7i}]q^{2}((q;q)^{3}_{\infty})^{2}$$.
* It is, of course, quite easy to be more precise than this, but unnecessary for the argument. On the other hand, maybe it's a nicer argument to say that $$\frac{1}{(q^7;q^7)_\infty}$$ is the generating function for the partition numbers inflated by a factor of seven, so that $$[q^{7n+7}]\frac{q^{2}((q;q)^{3}_{\infty})^{2}}{(q^{7};q^{7})_{\infty}} = [q^{7n+7}](q^{2}((q;q)^{3}_{\infty})^{2})\sum_{i=0}^\infty P(i)q^{7i} = \sum_{i=0}^{n+1} P(i)[q^{7(n-i+1)}](q^{2}((q;q)^{3}_{\infty})^{2})$$