Mikhail Kapranov
We establish a relation between the generating functions appearing in the S-duality conjecture of Vafa and Witten and geometric Eisenstein series for Kac-Moody groups. For a pair consisting of a surface and a curve on it, we consider a refined generating function (involving $G$-bundles with parabolic structures along the curve) which depends on the elliptic as well as modular variables and prove its functional equation with respect to the affine Weyl group, thus establishing the elliptic behavior. When the curve is $\Bbb P^1$, we calculate the Eisenstein-Kac-Moody series explicitly and it turns out to be a certain deformation of the irreducible Kac-Moody character, more precisely, an analog of the Hall- Littlewood polynomial for the affine root system. We also get an explicit formula for the universal blowup function for any simply connected structure group.