As the title say I try to better understand the approximation due to Ramanujan :
$$\frac{\sqrt{\pi}\left(\frac{x}{e}\right)^{x}\left(8x^{3}+4x^{2}+x+\frac{1}{30}\right)^{\frac{1}{6}}}{x!}>1,\forall x>0$$
What's the intuition behind this ?
I managed myself to find some other formula like :
Let $x>0$ then we have :
$$\left(\frac{-\frac{1}{30}+\sqrt{1+x\sqrt{1+x\sqrt{1+x\sqrt{1+x\sqrt{...}}}}}}{x}\right)^{\frac{1}{6}}<\frac{x!}{\sqrt{2\pi x}\left(\frac{x}{e}\right)^{x}}$$
A more spectacular example is :
Let $x>0$ then we have :
$$f\left(x+1\right)-\left(\left(\sqrt{\pi}\left(\frac{x}{e}\right)^{x}\left(8x^{3}+4x^{2}+x+\frac{1}{100}\right)^{\frac{1}{6}}\right)^{-1}x!\right)>0$$
Where : $$f\left(x\right)=\left(\frac{\left(\sqrt{1+x\sqrt{1+x\sqrt{1+x\sqrt{\cdot\cdot\cdot}}}}\right)}{x}\tanh\left(x\right)\right)^{\frac{1}{x}}$$
So starting from this example we see that the inspiration of Ramanujan is not composite but is for sure at this point a nice thinking .
Second remark :
We can also say that the Stirling's approximation is not unique see :
$$\lim_{x\to\infty}q\left(x\right)=\lim_{x\to\infty}\left(\frac{x!}{f\left(x\right)}\right)^{-1}\cdot\frac{\left(h\left(x\right)\right)^{-1}}{\left(x-\frac{1}{12}\right)}=1$$
Where :
$$h\left(x\right)=\exp(13/(99x^{\frac{9}{2}})+5/(63x^{\frac{7}{2}})-12/(35x^{\frac{5}{2}})+7/(15x^{1.5})-1/(15x^{5})+9/(40x^{4})-5/(24x^{3})-1/(12x^{2})-\sqrt{x}-1/(3\sqrt{x})+3/(4x)+1/2),f\left(x\right)=\sqrt{2\pi x}\left(1-\sqrt{x}+x\right)^{1+x}e^{-x}$$
Now let $h(x)$ as above and introduce :
$$F\left(x\right)=\sqrt{\pi}\left(1-\sqrt{x}+x\right)^{1+x}e^{-x}\cdot(8x^{3}+4x^{2}+x+1/30)^{\frac{1}{6}}$$
We have :
$$\lim_{x\to\infty}\left(\frac{x!}{F\left(x\right)}\right)^{-1}\cdot\frac{\left(h\left(x\right)\right)^{-1}}{x}=1$$
So it seems under a slight modification of the Ramaanujan's approximation there is some invariant ($h(x)$ doesn't change).
Is it purely a calculus trick ? Or in other words Does Ramanujan have a single idea in mind ? If so have you some example where Ramanujan draws perfectly ?
Any helps is greatly welcome .