A generalization of partition function to the sums of squares The well known partition function $p(n)$ is defined as the number of ways to represent $n$ as the sum of natural numbers. An asymptotic formula for $p(n)$ is
$$p(n)\sim\frac{1}{4n\sqrt{3}}\exp\left(\pi\sqrt{\frac{2n}{3}}\right)$$
which was obtained by Ramanujan. Recently an interesting idea came to me: generalizing the partition function. The number of ways of representing $n$ as the sum of four squares is known, and many similar things like number of ways of representing a number as a sum of two squares, etc. are known. But that didn't satisfy me. I wanted to truly generalize it.
So first, I took $p_2(n)$, the number of ways of representing $n$ as the sum of squares. It is obvious that $p_2(n)\le p(n)$. It has been conjectured that
$$p_2(n)\sim c\cdot n^{\alpha}\exp(\beta\cdot n^{1/3})$$
where

*

*$\alpha=-\frac{7}{6}$

*$\beta=\frac{3}{2}\frac{\pi}{2}^{1/3}\zeta\left(\frac{3}{2}\right)^{2/3}$

*$c=\frac{\zeta(3/2)^{2/3}}{\sqrt{3}(4\pi)^{7/6}}$
and the generating function of $p_2(n)$ is
$$\prod_{m\ge1}\frac{1}{1-n^{m^2}}$$
I found these in an article which was not at all about $p_2(n)$ but these two were given for some reason. So my main questions are:

*What more is known about $p_2(n)$?

*What is the generating function of $r_k(n)$? What is $r_k(n)$ is mentioned below.

And the questions which are not necessary to answer but they would be useful for me are:

*

*How was the conjecture even formulated? I don't think it was formulated because of computational evidence because the formula is too much complicated.

*How can we prove that generating function formula?

Update: $p_2(n)$ is on OEIS as entry A001156. From that page, I found that
$$p_2(n)\sim3^{-1/2}(4\pi n)^{-7/6}\zeta\left(\frac{3}{2}\right)^{2/3}\exp(3\cdot2^{-4/3}\pi^{1/3}\zeta\left(\frac{3}{2}\right)^{2/3}n^{1/3})$$
Which was proven by Hardy and Ramanujan. Can anyone link an article containing the proof of this asymptotic formula?

See the paper

*

*G. H. Hardy, S. Ramanujan, Asymptotic formulæ in combinatory analysis, Proceedings of the London Mathematical Society (series 2) 17 (1918) pp75—115, doi:10.1112/plms/s2-17.1.75, (scanned pdf, retypeset pdf).

$p_2(n)$ is not a standard notation; but a standard notation if $r_k(n)$ (many authors use it), which denotes the number of ways of representing $n$ as a sum of $k$ squares.
 A: 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)$.
A: 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.
