Employing the method of generating functions in conjunction with various number-thoretic identities, we obtain recursion relations for the Kostant partition functions for the affine Kac-Moody algebras The partition functions for the higher rank algebras are expressed in terms of S U ˆ ( 2 ) partition functions. We derive certain number-theoretic identities using the equivalence of our result with the expressions derived by Kac and Peterson.