  We study M-theory and D-brane quantum partition functions for microscopic
black hole ensembles within the context of the AdS/CFT correspondence in terms
of highest weight representations of infinite-dimensional Lie algebras,
elliptic genera, and Hilbert schemes, and describe their relations to elliptic
modular forms. The common feature in our examples lie in the modular properties
of the characters of certain representations of the pertinent affine Lie
algebras, and in the role of spectral functions of hyperbolic three-geometry
associated with q-series in the calculation of elliptic genera. We present new
calculations of supergravity elliptic genera on local Calabi-Yau threefolds in
terms of BPS invariants and spectral functions, and also of equivariant D-brane
elliptic genera on generic toric singularities. We use these examples to
conjecture a link between the black hole partition functions and elliptic
cohomology.
