TITLE: Hardy Ramanujan Asymptotic Formula for the Partition Number
QUESTION [7 upvotes]: I am needing to use the asymptotic formula for the partition number, $p(n)$ (see here for details about partitions).
The asymptotic formula always seems to be written as,
$ p(n) \sim \frac{1}{4n\sqrt{3}}e^{\pi \sqrt{\frac{2n}{3}}}, $
however I need to know the order of the omitted terms, (i.e. I need whatever the little-o of this expression is). Does anybody know what this is, and a reference for it? I haven't been able to find it online, and don't have access to a copy of Andrews 'Theory of Integer Partitions'.
Thank you.

REPLY [13 votes]: The original paper addresses this issue on p. 83:
$$
p(n)=\frac{1}{2\pi\sqrt2}\frac{d}{dn}\left(\frac{e^{C\lambda_n}}{\lambda_n}\right) + \frac{(-1)^n}{2\pi}\frac{d}{dn}\left(\frac{e^{C\lambda_n/2}}{\lambda_n}\right) + O\left(e^{(C/3+\varepsilon)\sqrt n}\right)
$$
with
$$
C=\frac{2\pi}{\sqrt6},\ \lambda_n=\sqrt{n-1/24},\ \varepsilon>0.
$$
If I compute correctly, this gives
$$
e^{\pi\sqrt{\frac{2n}{3}}} \left(
\frac{1}{4n\sqrt3}
-\frac{72+\pi^2}{288\pi n\sqrt{2n}}
+\frac{432+\pi^2}{27648n^2\sqrt3}
+O\left(\frac{1}{n^2\sqrt n}\right)
\right)
$$