Computing Ramanujan asymptotic formula from Rademacher's formula for the partition function
Using the leading term of Radmacher's formula, we have \begin{align*} p(n) & \sim \frac{1}{{\pi \sqrt 2 }}\left[ {\frac{\mathrm{d}}{{\mathrm{d}x}}\frac{{\sinh \left( {\pi \sqrt {\frac{2}{3}\left( {x - \frac{1}{{24}}} \right)} } \right)}}{{\sqrt {x - \frac{1}{{24}}} }}} \right]_{x = n} \\ & = \frac{{4\sqrt 3 }}{{24n - 1}}\cosh \left( {\pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} } \right) - \frac{1}{\pi}\frac{{24\sqrt 3 }}{{(24n - 1)^{3/2} }}\sinh \left( {\pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} } \right). \end{align*} Now \begin{align*} \pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} = \pi \sqrt {\frac{2}{3}n} \sqrt {1 - \frac{1}{{24n}}} & = \pi \sqrt {\frac{2}{3}n} \left( {1 + \mathcal{O}\!\left( {\frac{1}{n}} \right)} \right) \\ &= \pi \sqrt {\frac{2}{3}n} + \mathcal{O}\!\left( {\frac{1}{{\sqrt n }}} \right). \end{align*} Thus, \begin{align*} & \cosh \left( {\pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} } \right),\sinh \left( {\pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} } \right) \sim \frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}\left( {n - \frac{1}{{24}}} \right)} } \right) \\ & = \frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} + \mathcal{O}\!\left( {\frac{1}{{\sqrt n }}} \right)} \right) = \frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right)\left( {1 +\mathcal{O}\!\left( {\frac{1}{{\sqrt n }}} \right)} \right) \\ & \sim \frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right). \end{align*} And therefore, \begin{align*} p(n) & \sim \frac{{4\sqrt 3 }}{{24n - 1}}\frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right) - \frac{1}{\pi }\frac{{24\sqrt 3 }}{{(24n - 1)^{3/2} }}\frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right) \\ & \sim \frac{{4\sqrt 3 }}{{24n}}\frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right) - \frac{1}{\pi }\frac{{24\sqrt 3 }}{{(24n)^{3/2} }}\frac{1}{2}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right) \\ & = \frac{1}{{4n\sqrt 3 }}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right)\left( {1 - \frac{{\sqrt 3 }}{{\sqrt 2 \pi n^{1/2} }}} \right) \sim \frac{1}{{4n\sqrt 3 }}\exp \left( {\pi \sqrt {\frac{2}{3}n} } \right). \end{align*}