## Sums of four squares and the modular invariant

The question accounts my curiosity only, and may not be as deep as I think.

One of recent talks at our local seminar was devoted to the proof of the classical formula $$F(q)=\sum_{n=0}^\infty r_4(n)q^n =\biggl(\sum_{n\in\mathbb Z}q^{n^2}\biggr)^4 =1+8\sum_{n=1}^\infty\frac{q^n}{(1+(-1)^nq^n)^2}$$ for the generating function of the number $r_4(n)$ of representations of $n$ as a sum of four squares of integers. The key ingredient is the fact that the function $F(e^{2\pi i\tau})$ is a modular form of weight 2 and level 4. As an illustrative example, the speaker gave $r_4(100)=744$ which, of course, can be also given in a more "general" form $r_4(2^\ell\cdot25)=744$ for $\ell=1,2,\dots$. This number 744 is not quite random: it appears as the constant term in the modular invariant $$J(q)=\frac1q+\sum_{m=0}^\infty c_mq^m =\frac1q+744+196884q+21493760q^2+\cdots,$$ a (weak) modular form of weight 0 viewed as a function of $\tau$ where $q=e^{2\pi i\tau}$. The next coefficient $c_1=196884$ is not divisible by 8, hence cannot be given as $r_4(n)$ for some $n$, but then the problem of finding solutions to the equation $c_m=r_4(n)$ becomes messy. (In fact, I cannot find any other with $m\ge2$.) My particular problem is as follows.

Question. Are there (in)finitely many $m$ such that $c_m=r_4(n)$ for some $n$?

Well, it seems to be quite natural to ask even the following.

General question. Suppose $A(q)=\sum_{n\gg-\infty}a_nq^n$ and $B(q)=\sum_{m\gg-\infty}b_mq^m$ are two modular forms of different weight with, say, nonnegative coefficients and $b_{m+1}>b_m$ holding for $m\ge m_0$. Is there a way to decide whether the equation $a_n=b_m$ holds for infinitely many $m\ge m_0$?

-
This doesn't quite fall under the scope of your question, but it's not so easy to decide, for example, whether the modular forms $A(q) = q \prod_{n=1}^{\infty}(1 - q^n)^{24}$ and $B(q) = 0$ have coefficients in common. – Lavender Honey Nov 23 2011 at 2:03
Thanks for providing details, dear W.! Although your $A(q)$ isn't modular at all, I believe that your example can be further developed into something modular and positive. What really scares me is that our lengthy correspondence gives me no better understanding of the original questions, especially the non-generalized one. For this I remove my earlier commentary, sorry for that. – Wadim Zudilin Nov 23 2011 at 7:17
Isn't generalizing from $c_0=744$ to $c_n, n \ne 0$ a bit suspicious since $J(q)-c$ is still modular invariant for any constant $c$? – Jeff Harvey Nov 23 2011 at 18:50
$A(q) = q \prod_{n=1}^{\infty} (1 - q^{8n})^3 = \sum_{0}^{\infty} (2n+1) (-1)^n q^{(2n+1)^2}$ is modular, and leads to quite a few "easy" examples. – Lavender Honey Nov 23 2011 at 20:24
Another solution is $c_4=r_4(1212642294)$ and there are some other $n$ such that $c_4=r_4(n)$, although I didn't try to list them all. For a given $c_m$ the equation $c_m=r_4(n)$ boils down to an equation of the form $\sigma(x)=A$ which is relatively easy to solve if we know the factorization of $A$. However I have no idea how to tackle the problem in general. – François Brunault Nov 23 2011 at 22:40
show 1 more comment