OFFSET
0,4
COMMENTS
LINKS
Peter Luschny, Approximations to the factorial function, Factorial Function.
W. Wang, Unified approaches to the approximations of the gamma function, J. Number Theory (2016).
Eric Weisstein's World of Mathematics, Stirling's Approximation.
FORMULA
Let G = Sum_{k>=0} G[k]/n^k, then n! ~ sqrt(2Pi(n+1/6))*(n/e)^n*G.
EXAMPLE
G_0 = 1, G_1 = 0, G_2 = 1/144, G_3 = -23/6480, G_4 = 5/41472.
MAPLE
CoefNumer := f -> numer([1, seq(coeff(convert(series(f, n=infinity, 20), polynom), n^(-k)), k=1..16)]): CoefNumer(n!/(n^n/exp(n)*sqrt(2*Pi)*sqrt(n+1/6)));
MATHEMATICA
a[n_] := SeriesCoefficient[ x!/(x^x/Exp[x]*Sqrt[2*Pi]*Sqrt[x+1/6]) /. x -> 1/y, {y, 0, n}]; Table[a[n] // Numerator, {n, 0, 16}] (* Jean-François Alcover, Feb 05 2014 *)
CROSSREFS
KEYWORD
sign,frac
AUTHOR
Peter Luschny, Mar 11 2011
STATUS
approved