A generalization of partition function to the sums of squares

This asymptotic was stated by Hardy and Ramanujan, but without proof. The first proof of this asymptotic was given by Wright in 1934 [1], by a rather complicated argument. A much simpler approach using the circle method was given by Vaughan in 2015 [2]. Vaughan also gives much more information, allowing for more terms in this asymptotic expansion (see his Theorem 1.5). The introduction of Vaughan's paper gives more information. Vaughan's proof has been generalised to give similar asymptotic formula for the partition function restricted to $k$th powers for any $k\geq3$ by Gafni [3].

[1] E. M. Wright, Asymptotic partition formulae III. Partitions into $k$-th powers, Acta Math. 63 (1934), 143–191. Project Euclid (scanned pdf).

[2] R. C. Vaughan, Squares: Additive questions and partitions, International Journal of Number Theory 11 (2015), 1367–1409. doi:10.1142/S1793042115400096.

[3] A. Gafni, Power partitions, Journal of Number Theory 163 (2016), 19–42. doi:10.1016/j.jnt.2015.11.004, arXiv:1506.06124.


You also asked about the generating function. Write $r^k(n)$ for the number of partitions of $n$ with each part the $k$th power of a positive integer. That generating function is $$\sum_{n=0}^\infty r^k(n)q^n = \prod_{m=1}^\infty \frac{1}{1-q^{m^k}}$$ since the $m$th factor on the right is a geometric series $(1+q^{m^k}+q^{2m^k}+\cdots)$ accounting for $0,1,2,\ldots$ copies of $m^k$. (This is at the beginning of the Gafni paper referenced in Thomas Bloom's answer.)

You want to keep track of how many $k$th powers are used. Write $r_j^k(n)$ for the number of partitions of $n$ with exactly $j$ parts, each the $k$th power of a positive integer. To keep track of the number of $k\text{th}$ powers, use Euler's trick of including a tracking variable: $$\sum_{n=0}^\infty r_j^k(n)q^nz^j = \prod_{m=1}^\infty \frac{1}{1-zq^{m^k}}$$ where the geometric series is now $(1+zq^{m^k}+z^2q^{2m^k}+\cdots)$.