TITLE: Applications of generating functions to number theory
QUESTION [6 upvotes]: I am familiar (at least at a cursory level) with the extensive role generating functions play in the theory of partitions. What are some other prominent applications of generating functions to number theory?

REPLY [2 votes]: One can view $q$-expansions of modular forms as a kind of generating function. They contain information on many number theoretic objects such as partitions, divisor sums, point counts on elliptic curves, representation numbers of quadratic forms, class numbers etc.