TITLE: Curves on K3 and modular forms
QUESTION [15 upvotes]: The paper of Bryan and Leung "The enumerative geometry of $K3$ surfaces and modular forms" provides the following formula. Let $S$ be a $K3$ surface and $C$ be a holomorphic curve in $S$ representing a primitive homology class. If $N_g(n)$ is the number of curves of geometric genus $g$ with $n$ nodes passing through $g$ generic points in $S$ in the linear system $|C|$ with any $g$ and $n$ satisfying $C^2=2(g+n)+2$ then 
$$
\sum\limits_{n=0}^{\infty}N_{g}(n)q^n=\frac{q}{\Delta(q)}\left(q\frac{d}{dq}G_2(q)\right)^g
$$
where $\Delta(q)$ and $G_2(q)$ are the modular forms:
$$
\Delta(q)=q\prod\limits_{n=1}^{\infty} (1-q^n)^{24},\  G_2(q)=-\frac{1}{24}+\sum\limits_{n=1}^{\infty}\sum\limits_{k|n}kq^n.
$$
A relation between these two forms is well known in Number Theory. Unfortunately, I did not manage to find the relation and the first question is "What is the relation?". The main question is
How can one explain the relation between $\Delta(q)$ and $G_2(q)$ in the context of counting curves?
Some ideas are provided by the original paper of Bryan and Leung: these two modular forms correspond to numbers of (multiple) covers of a nodal rational curve and of an elliptic curve.

REPLY [19 votes]: The answer to your first question: "What is the relationship between $G_2$ and $\Delta$?" is
$$q\frac{d}{dq} \log \Delta = -24G_2   $$
where 
$$\Delta = q\prod_{m=1}^\infty (1-q^m)^{24}$$ and 
$$G_2 = -\frac{1}{24} +\sum_{d=1}^\infty \sum_{k|d}k q^d$$
(note that I've included the constant -1/24 which is in usual definition of $G_2$ which you admitted). The above relation is easy to prove directly: take the log of the definition of $\Delta$, use the taylor series of log, rearrange the sum, differentiate, and out pops $-24G_2$. 
To answer your second question of explaining this relationship in terms of counting curves, this can be done in the context of Gromov-Witten theory of the elliptic curve. Suppose that we wish to count the number of unramified covers of degree d of an elliptic curve $E$. We can either count connected covers, or possibly disconnected covers (and either way we should count each cover by the reciprocal of the number of automorphisms of the cover). Let $N_{conn}(d)$ and $N_{disc}(d)$ be the number of connected and possibly disconnected degree $d$ covers respectively. Let $$Z = \sum_{d>0}N_{disc}(d)q^d \quad\text{ and }\quad F=\sum_{d>0}N_{conn}(d)q^d $$ be the associated generating functions. Then the combinatorial relationship between possibly disconnected and connected covers yields 
$$Z=\exp{F}.$$
On the other hand, the number of connected covers is determined by covering space theory to be
$$N_{conn}(d)=\frac{1}{d}\cdot\#\{\text{index $d$ subgroups of $\mathbb{Z}\oplus \mathbb{Z}$}\}$$
which one easily can prove is given by $\frac{1}{d}\sum_{k|d}k$  by thinking about index $d$ sublattices or equivalently 2 by 2 integer matrices of determinant $d$. Thus we see that 
$$q\frac{d}{dq}F= G_2 +1/24.$$ 
On the other hand, possibly disconnected covers are determined by their monodromy and this yields
$$N_{disc}(d) = \frac{1}{d!}\cdot |\operatorname{Hom}(\mathbb{Z}\oplus \mathbb{Z},S_d)|$$
where $S_d$ is the symmetric group and the $1/d!$ prefactor is to remove the choice of a labelling of one fiber (necessary to get monodromy). The right hand side of the above equation can be computed with elementary group theory and one gets that $N_{disc}(d)$ is given by the number of conjugacy classes in $S_d$ which is in turn given by $p(d)$ the number of partitions of $d$. Thus $Z$ is the well known generating function for $p(d)$:
$$Z=\prod_{m>0}(1-q^m)^{-1} = \left(\frac{q}{\Delta}\right)^{\frac{1}{24}}$$.
Putting this whole discussion together, we see that the relationship between possibly disconnected and connected covers of the elliptic curve, i.e. $Z=\exp (F)$ becomes
$$q\frac{d}{dq}\log \left(\left(\frac{q}{\Delta}\right)^{\frac{1}{24}}\right) = G_2 +1/24$$
which is equivalent to the original relationship.