# Why this approximation not complete with me?

consider the sequence $$M \sim \sqrt{2\pi} (\frac{n}{e})^n \sqrt{8n^3+4n^2+n+\frac{1}{30}-\frac{1}{K_1n+K_2+\frac{T_1}{n}+\frac{T_2}{n^2}+\frac{T_3}{n^3}}}$$

prove that $$M \sim \sqrt{\pi} (\frac{n}{e})^n \sqrt{8n^3+4n^2+n+\frac{1}{30}-U_{n}},~~ n\geq1$$ where

$$U_n= \frac{1}{\frac{240n}{11}+\frac{9480}{847}+\frac{919466}{65219n}+\frac{1455925}{5021863n^2}+\frac{639130140092}{92804028n^3}}$$ i found the value of $$k_1,k_2,T_1$$ by measure the accuracy of this approximation by define the sequence by relation $$R_n=\ln n!-\ln \sqrt{2\pi}-n \ln n +n -\frac{1}{6}\ln\left(8n^3+4n^2+n+\frac{1}{30}-\frac{1}{K_1n+K_2}\right)$$ and get $$k_1,k_2$$

then defined it again and get $$T_1$$ by developing $$R_n-R_{n+1}$$ in power series in $$\frac{1}{n}$$ and used Taylor in mathematica prog mathematica prog, and used same method to get $$T_2,T_3$$ but not get with me as they are in $$U_n$$, any one can know the reason

• Where do you think the factor $\sqrt2$ vanishes to? Asymptotically, this is the difference between the two expressions. – LutzL Jul 11 at 20:36
• \begin{eqnarray*} M = n \Log[1 + \frac{1}{n} - 1 - \frac{1}{6} \Log[ (8 n^3 + 4 n^2 + n + \frac{1}{30 }- \frac{1}{(K1n + K2)}] + \frac{1}{6} \Log[(8 (n + 1)^3 + 4 (n + 1)^2 + (n + 1) + \frac{1}{30 } - \frac{1}{( K1 (n + 1) + K2))}] \end{eqnarray*} ,this the difference between the sequence ,by mathematica prog (taylor series) i get $k_1=\frac{240}{11}$,and $k_2=\frac{9480}{847}$ – researcher Jul 11 at 21:22
• What I mean is that in your first and also the last formula instead of $2\pi$ it has to be just $\pi$, the factor 2 is used under the 6th root. – LutzL Jul 11 at 21:25
• but $k_2$ not get with me as the value in the original sequence! – researcher Jul 11 at 21:28

## 2 Answers

Starting from the Stirling approximation $$\ln n!\sim n\ln n-n+{\tfrac {1}{2}}\ln(2\pi n)+{\frac {1}{12n}}-{\frac {1}{360n^{3}}}+{\frac {1}{1260n^{5}}}-{\frac {1}{1680n^{7}}}+\cdots$$ we get by simple manipulation of truncated Taylor series \begin{align} &\ln n!-n\ln n-n-\frac12\ln(\pi)\sim\frac12\ln(2n)+{\frac {1}{12n}}-{\frac {1}{360n^{3}}}+{\frac {1}{1260n^{5}}}-{\frac {1}{1680n^{7}}}+\cdots \\ &=\frac16\ln\left(8n^3\exp\left({\frac {1}{2n}}-{\frac {1}{60n^{3}}}+{\frac {1}{210n^{5}}}-{\frac {1}{280n^{7}}}+\cdots\right)\right) \\ &=\frac16\ln\left(8n^3 + 4n^2 + n + \frac1{30} - \frac{11}{240n} + \frac{79}{3360n^2} + \frac{3539}{201600n^3} - \frac{9511}{403200n^4} - \frac{10051}{716800n^5} + \cdots\right) \\ &=\frac16\ln\left(8n^3 + 4n^2 + n + \frac1{30} - \frac1{\frac{240n}{11} + \frac{9480}{847} + \frac{919466}{65219n} + \frac{1455925}{5021863n^2} - \frac{639130140029}{92804028240n^3} + \cdots }\right) \end{align}

Up to the last term, all other coefficients are the same as you got.

• how you get the value of all parameters at one time ! i get first k1,k2 then repeat the difference between series again and by taylor get T1 ,and using the same method to get the other parameters – researcher Jul 11 at 22:21
• I use the truncated power series data type of the Magma CAS, and manual exponent shifting to reconstruct the form (Ramanujan?) that you want to achieve, starting from the power series given in wikipedia. – LutzL Jul 11 at 22:25

@luzl thanks for your help i know this
but i need to find this differenceby this way by taylor to find T_2 usch that i find $$k1,k_2,T_1$$ as in this seq ,not but $$T_2$$ not get as it's value in the top seq (n>1)i used (n from 0 to 7) $$\begin{eqnarray*} \frac{1}{n} \log[1 + n] -1 -\frac{1}{6} \log[ 8 (\frac{1}{n})^3 + 4 (\frac{1}{n})^2 + \frac{1}{n}+ \frac{1}{30} - \frac{1}{(\frac{240}{11} \frac{1}{n} + \frac{9480}{847}+\frac{919466}{65219\frac{1}{n}} +\frac{T_2}{(\frac{1}{n})^2}))}] +\frac{1}{6} \log[8 (\frac{1}{n} + 1)^3 +4 (\frac{1}{n}+1)^2 +(\frac{1}{n} + 1) +\frac{1}{30} -\frac{1}{(\frac{240}{11} (\frac{1}{n} + 1) + \frac{9480}{847}+\frac{919466}{(65219(\frac{1}{n}+1)}+\frac{T_2}{(\frac{1}{n}+1)^2})}] \end{eqnarray*}$$