Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is proved in Advanced Calculus by Angus Taylor, § 20.8, that

$$\log n!=\log \left( \left( \frac{n}{e}\right) ^{n}\sqrt{2\pi n}\right) +r_{n},$$


$$r_{n}=\sum_{k=1}^{\infty }S_{k}$$


$$S_{k}=\sum_{p=n+1}^{\infty }\frac{k}{2(k+1)(k+2)p^{k+1}}.$$

This formula for $r_{n}$ provides a method for finding the estimate

$$\frac{1}{12\left( n+1\right) }<r_{n}<\frac{1}{12\left( n-1\right) }.$$


$$\frac{1}{k\left( n+1\right) ^{k}}=\sum_{p=n+1}^{\infty }\int_{p}^{p+1}\frac{% 1}{x^{k+1}}\mathrm dx<\sum_{p=n+1}^{\infty }\frac{1}{p^{k+1}}$$

$$\sum_{p=n+1}^{\infty }\frac{1}{p^{k+1}}<\sum_{p=n+1}^{\infty }\int_{p-1}^{p}% \frac{1}{x^{k+1}}\mathrm dx=\frac{1}{kn^{k}},$$

and so

$$\frac{1}{2(k+1)(k+2)\left( n+1\right) ^{k}}<S_{k}<\frac{1}{2(k+1)(k+2)n^{k}} $$

$$\frac{1}{12\left( n+1\right) }<\sum_{k=1}^{\infty }\frac{1}{% 2(k+1)(k+2)\left( n+1\right) ^{k}}<r_{n}<\sum_{k=1}^{\infty }\frac{1}{% 2(k+1)(k+2)n^{k}}<\frac{1}{12\left( n-1\right) }.$$

Added:The Wikipedia article pointed to in the comment gives an approximation based on the Euler-MacLaurin formula in terms of the Bernoulli numbers and states that it can also be obtained by repeated integration by parts. The Stirling series that appears in the same article is different from the one above.

Question (edited): Are there better estimates of $r_{n}$ based on different methods?

share|cite|improve this question
This might be of interest:… – Hans Lundmark Dec 2 '10 at 13:46
@Hans Lundmark, Thanks. Now I am more pessimist of getting better answers than the Wikipedia entry. – Américo Tavares Dec 2 '10 at 14:34
I recall reading a paper that used both the trapezoidal rule and the midpoint rule to generate Stirling's formula with remainder; however, since the truncation error of those two quadrature methods is in fact the Euler-Maclaurin formula in a different garb, that approach might as well be duplicating that which is already in Wikipedia. – J. M. Dec 2 '10 at 14:50
up vote 9 down vote accepted

Here's a paper Stirling's Series Made Easy by Chris Impens that states in Corollary 3

$$ \frac{1}{12n} - \frac{1}{360n^3} < r_n < \frac{1}{12n}$$

and (the interesting part) that the constant $1/360$ cannot be improved. I confess to not having read the paper closely.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.