http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/pmn.html Formulae for the Number of Partitions of n into at most m parts(Using the Quasi-Polynomial Ansatz) By Andrew V. Sills and Doron Zeilberger Contains Maple package, I might try to port it to sage.