Although this question has been answered, I wondered what happened if I expanded on Claude Leibovici's answer, specifically the $x(n)$ part.
So let's state the altered version of Ramanujan's factorial approximation:
$$\fbox{$n!=\sqrt{\pi} \left(\frac{n}{e}\right)^n \sqrt[6]{8n^3+4n^2+n+x(n)}$}\tag1$$
There will be 2 investigations of $x(n)$: the first investigation is to try and find the formula to it, the second investigation would be making $x(n) = \frac{1}{\pi^3}$ and seeing what happens before seeing the results when I add another value to $\frac{1}{\pi^3}$ as well as seeing the results when I expand upon Brian Fink's answer.
Investigation 1: Finding the exact formula for $x(n)$
From Claude, I know that
$$x(0)=\frac{1}{\pi^3}$$
$$x(1)=\frac{e^6}{\pi^3}-13$$
$x(1)$'s value given above is the correct value when doing calculations.
Calculating for more values of $n$, I get:
$$x(2)=\frac{e^{12}}{64\pi^3}-82$$
$$x(3)=\frac{64e^{18}}{531441\pi^3}-255$$
$$x(4)=\frac{729e^{24}}{1073741824\pi^3}-580$$
$$x(5)=\frac{191102976e^{30}}{59604644775390625\pi^3}-1105$$
Looking at all these values calculated above, I conjectured that
$$\fbox{$x(n)=\frac{m_1e^{6n}}{m_2\pi^3}-m_3$}\tag2$$
where $m_1, m_2, m_3$ are all constants.
Now, looking at $(1)$, I know that $\frac{e^{6n}}{\pi^3}$ is true, that $\frac{m_1}{m_2}$ is a simplified form of $\frac{(n!)^6}{n^{6n}}$ and that $m_3 = 8n^3 + 4n^2 + n$.
Looking at the above, I simplified $(2)$ to
$$x(n)=\frac{m_1e^{6n}}{m_2\pi^3} - (8n^3 + 4n^2 + n)$$
and hence, $(1)$ to
$$n!=n^n\sqrt[6]{\frac{m_1}{m_2}}$$
Now, to continue this investigation, I have to find the formula for $\frac{m_1}{m_2}$ (I am assuming that $\frac{m_1}{m_2} \neq \frac{(n!)^6}{n^{6n}}$ since that would render this investigation useless and remembering the fact that fractions can be simplified.).
However, upon further analysis, $\frac{(n!)^6}{n^{6n}}$ cannot be algebraically simplified any further and simultaneously have an impact on $(1)$. Therefore, this concludes Investigation 1.
Conclusion to Investigation 1: There is no direct formula for $x(n)$.
Investigation 2: Letting $x(n) = \frac{1}{\pi^3}$ before trying 2 different approaches to improve on it.
First, let $x(n)=\frac{1}{\pi^3}$. Therefore, $(1)$ becomes
$$n!=\sqrt{\pi} \left(\frac{n}{e}\right)^n \sqrt[6]{8n^3+4n^2+n+\frac{1}{\pi^3}}$$
Now, if I draw up tables that compare the old Ramanujan approximation and the error to $n!$ compared to the new Ramanujan approximation and the error to $n!$, I find the following:
Old Ramanujan approximation:
$$\begin{array}{r|rr}
n&\text{actual }n!&\text{Old Ramanujan approximation}\\\hline
0&1&1.005513858315898906334685\\
1&1&1.000283346113497298280502\\
2&2&2.000066137639113675155990\\
3&6&6.000048293969899370824935\\
4&24&24.000067662060676644042510\\
5&120&120.000147065856635128019467\\
6&720&720.000442402580258517644894\\
7&5040&5040.001717876125295382828871\\
8&40320&40320.008220460028928349902077\\
9&362880&362880.046912269278701001557543\\
10&3628800&3628800.311612606631103904381528\\
11&39916800&39916802.364768173672637433190699\end{array}$$
New Ramanujan approximation:
$$\begin{array}{r|rr}
n&\text{actual }n!&\text{New Ramanujan approximation}\\\hline
0&1&1\\
1&1&1.000269507969642134171580\\
2&2&2.000061741699989886660850\\
3&6&6.0000440521341150228558159\\
4&24&24.000060201780527149890347\\
5&120&120.00012748634469514287008\\
6&720&720.000373279217731143498611\\
7&5040&5040.00140952823029378963784\\
8&40320&40320.0065531124912329858538\\
9&362880&362880.036299640411270243050\\
10&3628800&3628800.23381599868447296934\\
11&39916800&39916801.7188944492554382834\end{array}$$
Comparing these 2 tables shows that having $x(n)=\frac{1}{\pi^3}$ has had a miniscule yet impactful effect on the approximation, getting it closer to the exact value of $n!$.
Now, I will start the 2 sub-investigations and their respective results: adding an additional value to $x(n)$ and expanding upon Brian Fink's work. (TBD at a later date.)
All text in italics are either notes or thoughts.
Update 1: After a few months, nothing. However, I've just come across a nice way to write the approximation without tweaking it. It's as follows:
$$\fbox{$n! \approx \sqrt{\pi} \left(\frac{n}{e}\right)^n \sqrt[6]{\left(2n+\frac{1}{3}\right)^3 +\frac{n}{3}-\frac{1}{270}}$}\tag3$$
If you wish to tweak the formula in $(3)$ , then just replace $\frac{1}{270}$ with $a$ .
In that case, the formula becomes:
$$\fbox{$n! \approx \sqrt{\pi} \left(\frac{n}{e}\right)^n \sqrt[6]{\left(2n+\frac{1}{3}\right)^3 +\frac{n}{3}-a}$}\tag4$$
with $a$ satisfying the inequality: $\frac{73}{2700} \leq a \leq \frac{1}{270}$ .
Edits and suggestions to this post are welcome.
An horrible suggestion for the factorial, but actually the only option ; if you really want to know how good it is numerically, IMO push your computations further.
– Patrick Da Silva Feb 16 '14 at 03:50