This book offers an introduction to the research in several recently discovered and actively developing mathematical and mathematical physics areas. It focuses on: 1) Feynman integrals and modular functions, 2) hyperbolic and Lorentzian Kac-Moody algebras, related automorphic forms and applications to quantum gravity, 3) superconformal indices and elliptic hypergeometric integrals, related instanton partition functions, 4) moonshine, its arithmetic aspects, Jacobi forms, elliptic genus, and string theory, and 5) theory and applications of the elliptic Painleve equation, and aspects of Painleve equations in quantum field theories. All the topics covered are related to various partition functions emerging in different supersymmetric and ordin...