jonathan m. borwein and robert m. corless¬rst author) are the ones that stand out, our “eleven...

25
Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 1 Gamma and Factorial in the Monthly Jonathan M. Borwein and Robert M. Corless 1. INTRODUCTION The Monthly has published roughly fifty papers on the Γ func- tion or Stirling’s formula. We survey those papers (discussing only our favourites in any detail) and place them in the context of the larger mathematical literature on Γ. We will adopt a convention of z C, n N, x R, and often x> 0. We begin with notation: Γ(z )=(z - 1)! = Z 0 t z-1 e -t dt for Re z> 0 , (1) which extends the positive integer factorial n!= n(n - 1) ··· 2 · 1 to the right half of the complex plane. The reflection formulas (discovered by Euler) (-z )!z != πz sin πz or Γ(1 - z )Γ(z )= π sin πz (2) explicitly show the analytic continuation and identify the poles at z = -n, nonpositive integers (for Γ), and negative integers (for factorial) with residues (-1) n /n! for Γ and an equivalent shifted result for factorial. We reluctantly bypass the amusing “notation war” where authors argue about the “minor but continual nuisance” of the shift by 1 in passing between factorial notation and Γ notation, z ! = Γ(1 + z ). See for example the footnotes in [26], [46], [51], the introduction in [57], and the history in [44], for some fullisades. An important fact is that Γ(x) is logarithmically convex, i.e. that ln Γ(x) is convex (see figure 1b) and that this distinguishes Γ amongst all interpolants of the factorial. This is the Bohr-Mollerup-Artin theorem. A function that satisfies f (z + 1) = zf (z ) and f (1) = 1—but is not logarithmically convex—is called a pseudogamma function. Euler’s definition of z ! is, for z not a negative integer, z ! = lim m→∞ m!(m + 1) z (z + 1)(z + 2) ··· (z + m) . (3) We have z != z (z - 1)! and Γ(z + 1) = z Γ(z ). Weierstrass apparently preferred Newman’s formula: 1 Γ(z ) = z e γz Y k1 1+ z k e -z/k , (4) where γ = lim n→∞ ( n k=1 1 / k - ln n) is the Euler-Mascheroni constant, γ =0.577 ... . The derivative of Γ is less convenient than is the combination ψ(z )= d dz ln Γ(z )= Γ 0 (z ) Γ(z ) . (5) The function ψ(z ) is also called the digamma function. January 2014] 1 arXiv:1703.05349v1 [math.HO] 15 Mar 2017

Upload: vankiet

Post on 21-May-2018

220 views

Category:

Documents


3 download

TRANSCRIPT

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 1

Gamma and Factorial in the MonthlyJonathan M. Borwein and Robert M. Corless

1. INTRODUCTION The Monthly has published roughly fifty papers on the Γ func-tion or Stirling’s formula. We survey those papers (discussing only our favourites inany detail) and place them in the context of the larger mathematical literature on Γ.We will adopt a convention of z ∈ C, n ∈ N, x ∈ R, and often x > 0. We begin withnotation:

Γ(z) = (z − 1)! =

∫ ∞0

tz−1e−t dt for Re z > 0 , (1)

which extends the positive integer factorial n! = n(n− 1) · · · 2 · 1 to the right half ofthe complex plane. The reflection formulas (discovered by Euler)

(−z)!z! =πz

sinπzor Γ(1− z)Γ(z) =

π

sinπz(2)

explicitly show the analytic continuation and identify the poles at z = −n, nonpositiveintegers (for Γ), and negative integers (for factorial) with residues (−1)n/n! for Γ andan equivalent shifted result for factorial.

We reluctantly bypass the amusing “notation war” where authors argue about the“minor but continual nuisance” of the shift by 1 in passing between factorial notationand Γ notation, z! = Γ(1 + z). See for example the footnotes in [26], [46], [51], theintroduction in [57], and the history in [44], for some fullisades.

An important fact is that Γ(x) is logarithmically convex, i.e. that ln Γ(x) is convex(see figure 1b) and that this distinguishes Γ amongst all interpolants of the factorial.This is the Bohr-Mollerup-Artin theorem. A function that satisfies f(z + 1) = zf(z)and f(1) = 1—but is not logarithmically convex—is called a pseudogamma function.

Euler’s definition of z! is, for z not a negative integer,

z! = limm→∞

m!(m+ 1)z

(z + 1)(z + 2) · · · (z +m). (3)

We have z! = z(z − 1)! and Γ(z + 1) = zΓ(z). Weierstrass apparently preferredNewman’s formula:

1

Γ(z)= zeγz

∏k≥1

(1 +

z

k

)e−z/k , (4)

where γ = limn→∞

(∑n

k=11/k− lnn) is the Euler-Mascheroni constant, γ = 0.577 . . . .

The derivative of Γ is less convenient than is the combination

ψ(z) =d

dzln Γ(z) =

Γ′(z)

Γ(z). (5)

The function ψ(z) is also called the digamma function.

January 2014] 1

arX

iv:1

703.

0534

9v1

[m

ath.

HO

] 1

5 M

ar 2

017

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 2

(a) (b)

Figure 1: (a) A graph of y = ln(Γ(x)√

(sinπx)/π) (solid line) with a graph of 10 terms of the Fourier Seriesfrom equation (8) (dashed line) superimposed. (b) A graph of ln Γ(x) for x > 0. The Bohr-Mollerup-Artincharacterization of Γ as the unique log-convex function satisfying Γ(x+ 1) = xΓ(x), Γ(1) = 1 is illustratedhere. The convexity of ln Γ(x) is clearly visible.

Legendre derived the duplication formula:

Γ(2z) = (2π)−12 22z−1/2Γ(z)Γ

(z +

1

2

). (6)

The reflection formula

ζ(z) = ζ(1− z)Γ(1− z)2zπz−1 sinπz

2(7)

was known to Euler, but was first proved by Riemann. Here ζ(z) =∑

n≥1 1/nz is thefamous Riemann zeta function. Kummer (1847) derived a Fourier series:

ln Γ(z) =1

2ln

π

sinπz+∑k≥1

(γ + ln 2πk) sin 2πkz

πk, (8)

which is illustrated in figure (1a). Also, the Beta function is

B(s, t) =

∫ 1

x=0

xs−1(1− x)t−1 dx =Γ(s)Γ(t)

Γ(s+ t). (9)

2. THE Γ AND FACTORIAL FUNCTIONS: A CROSS–SECTION OF MATH-EMATICS The following Monthly papers (in alphabetical order by surname of thefirst author) are the ones that stand out, our “eleven favourites”1:

1. Patrick Ahern and Walter Rudin, “Geometric Properties of the Γ function” [2]1In [13] the authors highlighted what they called “π∗” articles, i.e. those that had been cited at least 30

times. In contrast, inclusion in this list here is purely subjective.

2 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 3

2. Wladimir de Azevedo Pribitkin, “Laplace’s Integral, the Gamma Function andBeyond” [6]

3. Richard Askey, “Ramanujan’s extensions to the Γ and Beta functions” [4]4. Bruce Berndt, “The Γ function and the Hurwitz ζ-function” [10]5. Manjul Bhargava, “The factorial function and generalizations” [11]6. Philip J. Davis, “Leonhard Euler’s Integral” [26]7. Louis Gordon, “A stochastic approach to the Γ function” [43]8. Detlef Laugwitz and Bernd Rodewald, “A simple characterization of the Γ func-

tion” [59]9. Reinhold Remmert, “Wielandt’s theorem about the Γ function” [81]

10. Lee Rubel, “A survey of transcendentally transcendental functions” [85]11. Gopala Krishna Srinivasan, “The Gamma function: An eclectic tour” [92]

These eleven disparate papers provide a cross–section of mathematics: analysis, ge-ometry, statistics, combinatorics, logic and number theory. We begin with the earliest,the Chauvenet–winning [26] by Philip J. Davis. We then tour through the others andend with Fields medallist Manjul Bhargava’s [11].

Fundamental Properties Davis tells the story of Γ as an instance of how mathematicsevolves. This required informed historical commentary and an appreciation of math-ematical aesthetics. The paper was dedicated to the memory of Milton Abramowitz,who died (too young) in 1958. Davis was then chief of Numerical Analysis at The Na-tional Bureau of Standards of the United States, and a contributor to the great projectthat became (after six years of further hard work by Irene A. Stegun) the monumen-tal Handbook of Mathematical Functions [1]. Indeed the graph of the real Γ functionin [26] is apparently the same as in the Handbook. This is not a surprise: Davis wrotethat section.

This monumental work has recently been updated as The Digital Library ofMathematical Functions (http://dlmf.nist.gov) [76]. The DLMF and the similar-but-different INRIA project, Bruno Salvy’s Dynamic Dictionary (http://ddmf.msr-inria.inria.fr/1.9.1/ddmf) [87], fill a need for good online mathematical material.

To return to Γ, the paper [26] gives a story that enriches the plain facts in the Hand-book, and illustrates the evolution of mathematical thought. Davis spent a lot of spaceon the interpolation of n! by Γ(z + 1), treating it with the philosophical attention it de-serves. He did, however, note that Γ arises in applications mostly because the integraldefining it does.

The impressive paper [43] by L. Gordon proves many of these same facts by consid-ering the Γ distribution and taking the statistical point of view. Of course, Γ is widelyused in probability and statistics.

Now we come to the survey [85] by L. A. Rubel, which is concerned with Γonly insofar as Γ is the most famous of the “transcendentally transcendental” (TT)functions; that is, functions that do not satisfy any polynomial differential equationP (x; y, y′, · · · , yn) = 0. Functions that do satisfy such equations are called Differen-tial Algebraic functions; for instance, the Lambert W function [24] satisfies yey = xand thus is DA because

x(1 + y)y′ − y = 0 . (10)

It’s mentioned in [26] that the first proof that Γ is TT was due to Holder in 1887.

January 2014] 3

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 4

Rubel economically and intelligibly presents Ostrowski’s proof that Γ is TT. Theproof has many of the characteristics one sees in computer algebraic proofs: orderingterms in reverse lexicographic order (Rubel doesn’t call it that), and using divisibilityarguments to arrive at a minimalist polynomial P for Γ, which can then be shown self-contradictory. The only property of Γ aside from differentiability that is used is thefunctional equation Γ(x+ 1) = xΓ(x). Therefore, the proof runs through unchangedfor (sufficiently differentiable) pseudogamma functions. In particular, Hadamard’s en-tire pseudogamma H(z) (see equation (12) below), is TT. This was not pointed outin [26] and it’s not obvious from its definition (after all, the combination Γ(x +1)/Γ(x) is algebraic; it’s not automatic that combinations of Γ((1− x)/2),Γ(1− x/2)and Γ(1− x) will be TT). Altogether this highly-cited paper provides a very readableintroduction to the area, and fills a gap in the education of people who use Γ.

Characterizing Γ The paper [59] by Laugwitz and Rodewald was a suprise to RMC,as was the paper [81] by Remmert. RMC had not been aware of satisfactory alterna-tives to the Bohr-Mollerup-Artin characterization of Γ(x). Such a condition is neces-sary, because there are pseudogamma functions; for instance, Davis gives Hadamard’sexample (“Hadamard’s pseudogamma function”):

H(z) =1

Γ(1− z)d

dzln

(1− z

2

)/Γ

(1− z

2

)]. (11)

Maple simplifies this quite dramatically to

H(z) =

ψ

(1− z

2

)− ψ

(1−z2

)2Γ(1− z)

, (12)

where ψ(z) = Γ′(z)/Γ(z). In retrospect, it’s not so dramatic, merely replacing aderivative with ψ; nonetheless it looks simpler. For a more nuanced discussion of thesatisfaction given by such formulae, see [104] by Wilf.

Curiously enough H(z) is an entire function. Why, then, is Γ(z) to be preferredto H(z), given that Γ has poles at non-positive integers? The “real” answer given byDavis is that the integral for Γ appears frequently. But the logarithmic convexity char-acterization of Bohr-Mollerup-Artin is compelling. Davis eloquently explains “Thedesired condition was found in notions of convexity. A curve is convex if the followingis true of it: take any two points on the curve and join them by a straight line; then theportion of the curve between the points lies below the line. A convex curve does notwiggle; it cannot look like a camel’s back. At the turn of the century, convexity was inthe mathematical air. . .” [26, p. 867].

We point out that logarithmic convexity is stronger than mere convexity: the con-vexity of f(x) does not imply the convexity of ln f(x), but the convexity of ln f(x)implies that of f(x).

But there are alternative characterizations. The characterization discussed by Laug-witz and Rodewald in [59] is actually due to Euler himself, and is very elegant: “For afixed infinitely large natural number n and all finite natural numbersm, the expression(n + m)! behaves approximately like a geometric sequence.” [59, p.534]. Laugwitzand Rodewald go on to put this in a more usual ‘limit’ language: they prove that ifL(0) = 0, L(x+ 1) = ln(x+ 1) + L(x), and L(n+ x) = L(n) + x ln(n+ 1) +rn(x) where rn(x)→ 0 as n→∞ (here x ≥ 0 and n ∈ N) then L(x) exists and is

4 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 5

Figure 2. On the same scale as the graph in [26] we plot Γ(x) (solid black line), 1/Γ(x) (dotted line) andHadamard’s pseudogamma function from equation (12) (dashed line). The lack of convexity of Hadamard’sfunction is clearly visible.

unique and is thus ln(Γ(x+ 1)). They do this by showing that the conditions imply aconvergent series for L(x); they then verify that the resulting series,

L(x) = −γx+∑k≥1

(x

k− ln

(1 +

x

k

)), (13)

satisfies the conditions.Another alternative characterization is apparently due to Wielandt. Until Remmert’s

paper [81], this seems to have been “hardly known”. Wielandt’s theorem states thatif F (z) is holomorphic in the right half plane, F (z + 1) = zF (z) for all such z,and is bounded on the strip 1 ≤ Re z ≤ 2, then F (z) = aΓ(z) and a = F (1). Thischaracterization seems to be quite easy to use, more so than logarithmic convexity.

The intriguing and concise paper [2] by Ahern and Rudin cites [81] but does notappear to actually use Wielandt’s theorem; instead it extends logarithmic convexityinto the complex plane. The final theorem in the paper states that ln Γ(z) is univalentin Re z > x0, where x0 is the only positive zero of ψ(x). They note 1 < x0 < 2; bya computer algebra system, x0 = 1.4616321 . . .. There seems to be no standard namefor this number. This result on univalence seems to be as close as it gets in the Monthlyto a discussion of the functional inverse of Γ (see later in this section).

The very interesting (and fun to read) paper [6] by W. de Azevedo Pribitkin does useWielandt’s theorem. The paper is concerned with the Laplace integral for the reciprocalof Γ:

1

Γ(s)=

1

∫ ∞µ=−∞

ea+iµ

(a+ iµ)sdµ (14)

where a > 0 is any positive real number. This paper comes as close as any in theMonthly to the computation scheme of [89].

January 2014] 5

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 6

Srinivasan’s “Eclectic Tour” [92] also uses Wielandt’s theorem. This wide-rangingsurvey achieves a remarkable complementarity to Davis’ paper; indeed even the histor-ical details are different (not contradictory, just complementary). New elegant proofsof many results are attained using a function-theoretic mindset and a systematic ap-proach, apparently termed the “additive approach” by Remmert. The paper starts withthe differential equation (which is also in [26])

d2

dz2ln f(z) =

∑n≥0

1

(n+ z)2. (15)

With initial conditions f(1) = 1 and f ′(1) = −γ, this gives f(z) = Γ(z). Wielandt’stheorem is used in the proof. Altogether, this is a remarkable paper, which presents(with proofs!) a very significant body of knowledge of Γ, and of related functions.

Relationship to ζ Bruce Berndt’s short paper [10] illuminates old connections of Γ tothe Hurwitz ζ function. He gives several proofs using that connection. For instance, heproves equation (8). He first proves

ln Γ(z) = ζ ′(0, z)− ζ ′(0) (16)

where ′ means differentiation with respect to s (the first variable) and

ζ(s, z) =∑k≥0

(k + z)−s (17)

is the Hurwitz zeta function; ζ(s) = ζ(s, 1) is the Riemann zeta function.

Generalizations We begin with Askey’s beautiful paper [4]. Askey concurred withDavis on the reason Γ is useful: “Euler’s integral (1.3) occurs regularly and is thereal reason for studying the gamma function.” [4, p. 347]. Other than that, Askey’spaper is quite different from Davis’s, although it, too, tells a story, namely the story ofRamanujan’s q-extensions of the Γ and Beta functions. Askey provides much detail,many results, and concise proofs. He places the results in context, and explains whythey are important. His starting point was that Hardy thought the results strange; Askeydemonstrates that the results are profoundly connected to modern developments, andthus not so ‘strange’ today. Of course, part of the direction of modern developmentsis due to Ramanujan, so this conclusion might have been expected. Both Davis andAskey show relationships of Γ to other functions and areas.

Now we come to the paper [11] by Manjul Bhargava. The first time RMC readthe paper, RMC didn’t notice the author’s name2; RMC noted down that the paperwas concerned with discrete generalizations of the factorial, was focused on numbertheoretic ideas and applications, and seemed quite substantial, much more so thansome other “generalization” papers in the Monthly, namely [73] and [35] (althoughthe last isn’t so lightweight, either).

On RMC’s next pass, he paid a bit more attention. Bhargava was awarded the Fieldsmedal in 2014 for new methods in geometry of numbers. It seems a safe bet that thispaper, although written 14 years previous to his prize, might perhaps contain some-thing a bit more substantial than the average paper in the Monthly on the Γ function3.Of course, it does, even though it is written in a lively, almost joyful, style.

2In his defence, it was in a BIG pile of Γ papers!3It’s interesting that the notion “an average paper in the Monthly on Γ” actually makes sense.

6 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 7

Instead of making a small change in the definition of Γ (in contrast, the paper [73]by T. A. Newton changes integrals to sums, and derivatives to differences; the pa-per [35] by Tomlinson Fort changes the “+1” in the functional equation to a variable“+hn(x)”) Bhargava isolates an invariant that characterizes the factorial: he writes k!as the product over all primes p of certain valuations. Then he is able to generalizethis to work over subsets of the integers or even over more abstract objects. To do thishe used something reminiscent of the Leja ordering for good-quality use of Newtoninterpolation, and indeed the bases he constructs are very like Newton interpolationalbases. This generalization encompasses the q-factorials from enumerative combina-torics which we met in [4] and it seems the ones in [73] too, as well as others in thenon-Monthly literature.

Bharghava ends his paper with a sequence of then-open questions, including ques-tions on generalizations of this factorial to a generalized Γ function, and on general-izations of Stirling’s formula.

Shorter papers and notes There are quite a few short pieces on Γ in the Monthly.One of the oldest papers in the Monthly is [7], which uses explicit expressions fororthogonal polynomials and their orthogonality conditions to arrive at certain identitiesfor binomial double sums.

The Note [102] uses Holder’s inequality to establish(1− a

x+ a

)1−a

≤ Γ(x+ a)

xaΓ(x)≤ 1 (18)

for 0 < a < 1 and x > 0; letting x → ∞ gives the classical Γ(x + a) ∼ xaΓ(x),which is an asymptotic generalization of the functional equation Γ(x+ 1) = xΓ(x).Nanjundiah’s paper [69] contains an interesting trick, using the asymptotic relationB(α, t) ∼ Γ(α)/tα as t → ∞ between the Beta function and the Γ function to getthe exact relationship,B(x, y) = Γ(x)Γ(y)/Γ(x+ y) and from there through Γ(x+a) ∼ xaΓ(x) (again!) to Euler’s product definition.

The very pretty paper [74] cites [14] and a Monthly problem [38] as motivation, andproduces a recipe for finding some short products of Gammas that give simple values,such as

Γ

(1

62

(33

62

(35

62

(39

62

(47

62

)= 24π5/2 . (19)

The paper [17] merely finds Γ functions in a particular solution to the strange (nonlin-ear) ODE dny

dxndmxdym

= 1.The paper [54] by Knuth probably shouldn’t be included in this review, although the

ratio n!/nn plays a starring role: this is Egorychev’s theorem, that the permanent (likethe determinant, but with all plus signs instead of (−1)σ in the permutation expan-sion) of a doubly stochastic matrix cannot be less than this, and therefore the doublystochastic matrix A with aij = 1/n has this minimal permanent. Egorychev had set-tled a long-standing conjecture of Polya’s with this theorem, and the purpose of [54]was pure exposition. The paper also demonstrates that this review cannot be expectedto be complete—the paper was not found by computer search, but rather by browsing,i.e. by serendipity.

Speaking of serendipity, the paper [83] uses an exploration of something relatedto fractional integration to discuss just that, in mathematical practice. The notion of

January 2014] 7

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 8

fractional integration, i.e. interpolation in the dimension of a multiple integral, is anidea of the same type that led to the creation of Γ, of course, as discussed in [26].

The paper [36] is concerned with the ratio and its approximation

Γ

(n+

1 + u

2

(n+

1− u2

) ∼ (n2 +1− u2

12

)u/2(20)

for large n. This formula is exact when n ≥ 1 is an integer and u = 0,±1,±2. Therest of the paper is concerned with the error, which the author shows is exp(−εn(u))with

εn(u) =u(1− u2)(4− u2)

6!n4Fn(u) (21)

where 0 < Fn(u) ≤ 1 for |u| ≤ 1. The paper [50] is also concerned with Γ functionratios.

The expression (15) has a similar analogue in rising powers, namely

d2

dz2ln Γ(z) =

1

z+

1!

2· 1

z(z + 1)+

2!

3· 1

z(z + 1)(z + 2)+ · · · (22)

=∑`≥0

`!

(`+ 1)· 1

z`Re z > 0 (23)

where z` = z(z + 1) · · · (z + `− 1), z to the ` rising. This equation can be derivedfrom a formula of Gauss for a hypergeometric function with unit argument,

F

(a, bc

∣∣∣∣ 1) =∑j≥0

ajbj

cj· 1

j!=

Γ(c)Γ(c− a− b)Γ(c− a)Γ(c− b)

if Re(c− a− b) > 0 and c 6∈ N. The paper [86] gives some details of a proof.The paper [47] uses the Γ function to find volumes of spheres in higher dimension.The paper [25] by H. T. Davis considers the generating function for so–called log-

arithmic numbers Ln:

x

ln(1 + x)= 1 + L1x+ L2x

2 + · · ·

and establishes the curious interpolation formula L(t) = Ln when t = n, where

L(t) =

∫ 1

s=0

(st

)ds , (24)

among other results. H. T. Davis does not use the binomial notation, but rather a ratioof Γ functions, which makes clear the meaning of the neater binomial coefficient usedhere.

Finally, a referee points out the delightful paper [58] in which Lange uses propertiesof Γ to give a new continued fraction for π. Since Γ didn’t appear in the title, we missedthat one!

8 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 9

(a) (b)

Figure 3: (a) A phase plot of Γ(z) using the methods of [100]. The colors indicate the argument of Γ(x+ iy),and because (compared to the inset figure which plots just arg z where orange-yellow-green-blue-velvet-red ina rainbow palette goes counterclockwise around z = 0) the colors change in the clockwise direction aroundz = −n for integers n ≥ 0, we can see that there are poles there. (b) The famous 3D plot of |Γ(z)| from [49]can scarcely be improved upon. We add phase color here; any improvement on the older work seems merelycosmetic.

Gaps: computation, visualization, inverse Γ One purpose of a survey such as this isto identify gaps. We noticed three. There’s not much visualization for Γ in the Monthly,apart from in [26]. There’s almost no computational work. The most surprising omis-sion, though, is the lack of exploration of the functional inverse of Γ, which we denotehere by invΓ or Γ. To be fair, we have found only four references in total on invΓ,and none in the Monthly. Still, to have studied a function since 1730, or 1894 from thestart of the Monthly, without thinking of the inverse? It seems quite the blind spot.

Visualization There has been significant progress in comprehensible visualization ofcomplex functions, by the use of color phase plots [100, 101]. In the inset figure infigure 3a the z-plane is colored by arg(z) = invtan(y, x); the same colors are used infigure 3a for coloring by arg(Γ(z)). Of course, z = x+ iy. The poles at 0, −1, −2,and so on are clearly visible. In figure 3b we’ve added the same phase coloring to theplot of |Γ(z)|, on the same scale as the famous hand-drafted plot of [49]. If one lookscarefully, this figure illustrates Wielandt’s boundedness characterization: because thecontours in the right half bend away from y axis, the boundedness on (say) 1 ≤ x ≤ 2is entirely believable.

A similar pair of plots are given for equation (13), in figure 4. We will see morevisualizations shortly, including one for a portion of the Riemann surface for invΓ.

Computation We did not find in the Monthly any substantive discussion (or evenpointers) as to how to compute the Γ function, apart from using the fundamental re-currence to push z far enough into the right half-plane that Stirling’s asymptotic for-mula can be used. For a solid discussion of good methods, see [57], [89], and [91].Schmelzer and Trefethen’s [89] uses the beautiful contour integral

1

Γ(z)=

1

2πi

∫C

s−zesds . (25)

January 2014] 9

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 10

(a) (b)

Figure 4: (a) A phase plot of Hadamard’s pseudogamma function from equation (12). We detect zeros in the righthalf plane where the colors as in the inset figure go clockwise. Verifying this numerically, we find for instanceusing Maple that H(2.34652± 1.05516i)

.= 0. (b) This figure shows |H(z)| from equation (12). It is colored

by the phase. Because the contours bend left, this suggests that H(z) is not bounded in strips and thus doesnot satisfy Wielandt’s characterization. In fact we know from [37] that its growth in (say) 1 < Re(z) < 2 asIm(z)→∞ must be faster than exponential.

Here the contour C, called a deformed Bromwich contour, winds around the negativereal axis counterclockwise. It turns out that the trapezoidal rule (or the midpoint rule)is spectrally accurate for this quadrature, and the contour integral is (almost) entirelypractical! See [89] for details.

Inverse Γ

Plotting the real inverse Gamma function As stated earlier, it’s surprising in hindsightthat there’s so few (and only so recent) studies on the inverse Gamma function, invΓ,and none in the Monthly. We begin with the simplest things. Plotting inverse functionswith computer software is very simple, even if there are no routines for the inversefunction itself. The basic idea is explained in [90]: just exchange x and y. Figure 5bwas produced using Maple. The details of the code are available at http://www.apmaths.uwo.ca/~rcorless/frames/Gamma/GammaBorweinCorless.mw.

In figure 5a we see several locations where ψ(x) = Γ′(x)/Γ(x) is zero: betweenx = 1 and x = 2, (at about x0 = 1.4616 . . .), between x = −1 and x = 0 (at aboutx−1 = −0.5048 . . .), between x = −2 and x = −1 (at about x−2 = −1.5734 . . .),and so on. Denote x−k the root between −k and −k + 1, except x0 ∈ (1, 2). Eachof these locations separates a pair of branches of invΓ in figure 5b. The branchwith invΓ(x) ≥ x0 is of special interest, because it contains the inverse factorials:Γ(n) = (n− 1)! means that invΓ(24) = 5, for instance, on this branch. We take upthe asymptotics of this branch of invΓ in section 3.

Plotting the Riemann Surface for the Inverse Γ Function Given a reliable routine tocompute a complex function, it is possible to visualize the Riemann surface for invfautomatically [23, 95, 94]. The basic idea is the same as above. If z = x + iy and

10 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 11

(a) (b)

Figure 5: (a) A sketch of a portion of the plot of the real-valued Γ function showing some singularities. The plotwas produced in Maple 2016 using the code archived at http://www.apmaths.uwo.ca/~rcorless/frames/Gamma/GammaBorweinCorless.mw. (b) A sketch of a portion of the functional inverse of the real-valued Γfunction showing several branches including the largest. The plot was produced using Maple 2016. The code isarchived at http://www.apmaths.uwo.ca/~rcorless/frames/Gamma/GammaBorweinCorless.mw

f(z) = u+ iv, then a Riemann surface for invf , the functional inverse of f , can beplotted by plotting [u, v, y] as a parametric plot with x and y as parameters. Note thata routine to compute invf is not required.

There is one theoretical consideration, namely how to ensure that each point on therepresentation corresponds uniquely to a point on the four-dimensional map (x, y)↔(u, v), which isn’t always possible because not all Riemann surfaces are embeddablein 3D, but this can be mitigated by the use of color as the fourth dimension. There isa practical consideration, as well: namely how to choose the portion of the surface tofit into the viewing frame. For the Γ function, there is a further difficulty, namely itsextreme dynamic range, even in its imaginary part.

Because the functional inverse of the reciprocal of f is related simply to the func-tional inverse of f , as follows,

y = f(x)⇐⇒ x = invf(y) (26)

q = 1/f(p)⇐⇒ p = invf(1/q), q 6= 0 (27)

we decided to plot a portion of the Riemann surface for invΓ(1/z). See figure 6. Themultilayer convolutions show a rich structure for investigation. Our code is archived athttp://www.apmaths.uwo.ca/~rcorless/frames/Gamma/GammaBorweinCorless.mw.

As a practical matter, constructing branches of invΓ that people can use seemsto be at least as important. A colleague and RMC have completed some preliminaryinvestigations, but we’ll leave reporting on this to future work. We note the foundationsprovided by [78].

3. STIRLING’S FORMULA Judging by the number of articles in the Monthly onthe subject, Stirling’s formula approximating n! for large n is by far the most popularaspect of the Γ function. There are “some remarks”, “notes”, more “remarks”; there

January 2014] 11

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 12

Figure 6. A visualization of a portion of the Riemann surface for invΓ(1/z), showing a rich multilayeredstructure. This figure may be misleading—more investigation is needed.

are “simple proofs”, “direct proofs”, “new proofs”, “corrections”, “short proofs”,“very short proofs”, “elementary” proofs, “probabilistic” proofs, “new derivations”,and (our favourite title) “The (n+1)th proof”. The earliest one we can find is [48]; thepaper [84] is about a different formula4.

The name “Stirling’s formula” turns out not to be historically correct, as we willsee. However, there will be no changing the convention. Here is what we mean con-ventionally by Stirling’s formula:

ln Γ(z) =

(z − 1

2

)ln z − z + ln

√2π + r (28)

where Γ is asymptotic to a divergent series

r ∼∑n≥1

B2n

2n(2n− 1)z2n−1=

1

12z+

7

360z3+ · · · , (29)

and the B2n are Bernoulli numbers, with generating function

t

et − 1=∑n≥0

Bnn!tn . (30)

Stirling’s formula also occurs in an exponentiated form, Γ(z) ∼√

2πzz−1/2e−zer

and one can easily compute a series for er from (30). It turns out that

er ∼ 1 +1

12z+

1

288z2− 138

51840z3+ · · · = 1 +

∑k≥2

1 · 3 · · · (2k − 1)a2k−1zk−1

(31)4Which could be applied to z! and log Γ(1 + z). See [26].

12 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 13

with a1 = 1 and for n > 1

an =1

n+ 1

(an−1 −

n−1∑`=2

`a`an+1−`

). (32)

Note that only the odd n occur in (31) but that even n are needed in the recurrence.Most people don’t bother to distinguish equation (28) from its exponential: both

are useful, and both are called Stirling’s formula or Stirling’s series. Note that equa-tion (28) contains only odd powers and thus seems more efficient than equation (31):er contains all powers. Exponentiation of a series is simple. See e.g. [22, ch. 2].

Trapezoidal Rule analyses Hummel motivates the paper [48] by claiming

“The average college undergraduate, with nothing beyond an elementary cal-culus course, knows little about infinite series and still less about infinite prod-ucts, hence gets very little out of one of the usual developments of Stirling’sformula.”

Students were different, then, as was the curriculum. Nevertheless the conclusionsmay still be true. Hummel then goes on in [48] to use the concavity of logarithm andits consequential inequality from the trapezoidal rule to establish

e11/12√n nne−n < n! < e

√n nne−n (33)

and claims e11/12.=√

2π; since e11/12.= 2.5009 while

√2π

.= 2.5066 this claim is

entirely reasonable. The upper bound is not very tight.Several Monthly papers such as Nanjundiah’s [68] and the highly-cited [82] by

Robbins use a similar starting point, though few refer to [48]. The paper [107] usesit backwards to show Stirling’s formula implies the integral for lnx. Using the trape-zoidal rule is a natural idea: the trapezoidal rule gives a lower bound on an integral ofa concave function. The paper [52] uses the trapezoidal rule to establish the existenceof the limit—this is not a petty point. The paper [20] uses an average of trapezoids toget both a lower bound and an upper bound for n!.

Here is the basic element of the trapezoidal analysis: because ln t is concave, thetrapezoidal rule gives a lower bound for the integral:

1

2ln j +

1

2ln(j + 1) <

∫ j+1

t=j

ln t dt . (34)

We now do our own version. Adding up panels of width 1 from t = m to t = n, wherem < n,

1

2lnm+

n−1∑j=m+1

ln j +1

2lnn <

∫ n

t=m

ln t dt = n lnn− n−m lnm+m . (35)

Adding∑m

j=1 ln j − ln(m)/2 + ln(n)/2 to both sides,

n∑j=1

ln j < n lnn+1

2lnn− n+

m∑j=1

ln j − 1

2lnm−m lnm+m (36)

January 2014] 13

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 14

or

lnn! <

(n+

1

2

)lnn− n+ ln dm (37)

where

dm =m!em

mm+1/2. (38)

Exponentiating,

n! < dmnn+1/2e−n . (39)

We’ve thus replaced the constant c =√

2π in Stirling’s formula by a computableupper bound. The larger we take m, the tighter the bound. When m = 1 this is theupper bound quoted in [48]. Taking m = n − 1 gives the tightest possible estimate,but is silly, because to compute dn−1 requires (n− 1)!. We will considerm ≥ n later.Taking m small or of moderate size is reasonable in order to estimate n! for large n.Taking m = 10 gives d10

.= 2.5276, whereas

√2π

.= 2.5066. Taking m = 20 gives

d20.= 2.5171. More work shows dm monotonically decreases.

Binet’s Formula We pass so easily from n! to z! nowadays that it’s hard to notice thesteps in passing from the asymptotics of n! to the asymptotics of z!, and of courseit’s obvious that the formula must be the same5. Nonetheless , it’s satisfying to readin [103] a proof using Binet’s formula, namely (for Re z > 0)

ln Γ(z) =

(z − 1

2

)ln z − z + ln

√2π +

∫ ∞t=0

(1

2− 1

t+

1

et − 1

)e−tz

tdt , (40)

that they really are the same. In the Monthly, we find [88] which gives a similar proofof (40) and an intelligible recap of its use to derive the logarithmic variant (28) ofStirling’s formula, plus bounds guaranteeing the errors in truncation.

Other papers One of the prettiest papers is [3]. The author, M. I. Aissen, gives aconcise but lucid exposition that uses the simple inequality n! < nn and the propertiesof the ratios un = nn/n! to make the appearance of e seem inevitable and completelynatural. From there the author gives two proofs of Stirling’s formula, up to

√2π.

The shortest paper that we found is [80]: in just 17 lines, including title, references,and address, Pippenger establishes the following “striking companion to Wallis’ prod-uct”

e

2=

(2

1

)1/2 (2

3

4

3

)1/4 (4

5

6

5

6

7

8

7

)1/8

· · · (41)

by appeal to Stirling’s formula.The papers [69] and [62] give simple refinements of the result from the previously

mentioned [82] by Robbins.The author of [32], a famous statistician from Princeton, was “deeply apologetic”

in [33] for various errors. We point this out not in a spirit of schadenfreude but ratherin sympathy; we hope there are no errors in this present work, but.

5Some proofs do appear in the Monthly, e.g. Blyth and Pathak [12] use Γ(n+ α) ∼ nαΓ(n) to do so.

14 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 15

In [77] we find a “very short proof” that eschews the Central Limit Theorem asclaimed to be used in [12] because that “cannot reasonably be considered elemen-tary.” Instead, the author (Patin) uses the Lebesgue dominated convergence theorem!In fact the authors of [12] criticize earlier papers, namely [53] and [106], for inappro-priately using the Central Limit Theorem which they say gives results valid only forthe asymptotics of n! for integers n. They use moment generating functions instead.

The paper [79] uses the Poisson distribution to get Stirling’s formula (includingthe√

2π). The paper [60] uses change of variables. The pair of papers by ReinhardMichel [64] and [65] use artful estimates of ln and skilful substitution to get sev-eral terms of Stirling’s formula in a really elementary way. The second paper has ourfavourite title, “The (n+ 1)th proof of Stirling’s formula”, and takes a swipe at Patinfor calling the Lebesgue dominated convergence theorem “elementary”. The letter tothe Editor [70] takes a different swipe and claims Patin’s proof is contained in New-man’s Problem Seminar.

Six years after the (n+ 1)th proof, we have another “new proof” in [72].The very impressive paper [28] gives a concise but complete version of Laplace’s

argument, and a nice historical discussion, including mention of de Moivre.The paper [66] gives an elementary proof that

limn→∞

(n!)1/n

n=

1

e(42)

and thereby extends the power of the root test.The paper [67] did something quite different, namely use the Legendre duplication

formula (6) and generalization to get some new recurrence relations for the logarithmicvariant, equation (28). This generated the follow-up paper [27] because this gave newformulae for Bernoulli numbers.

The paper [31] extends Stirling’s formula for use with a certain generalization ofcentral binomial coefficients. Its focus seems to be statistical, and it uses discrete ran-dom variables and the Central Limit Theorem.

The paper [63] is not without flaws, and indeed was criticized in [45] for not be-ing as “new” as its title claimed6, having been anticipated by the textbook treatmentin [21]. Indeed, [21] points further back, to Watson and Ramanujan for the main idea.Nonetheless [63] is an interesting and readable paper, and the recurrence relation de-veloped there, which we have already presented in equation (32), is apparently notin [21] and seems to be new to the paper. This paper was discussed in some detailin [15].

One can say more, nowadays: in [16] and [71] we find “explicit” formulas in termsof 2-associated Stirling numbers, and David Jeffrey reports (personal communication)the following expression:

1 · 3 · ·5 · · · (2n− 1)an =(n

2+ 1

)n−1 n−1∑k=1

(−1)k

(n− k − 1)!

2k

(n+ 2k)!

[n+ 2k − 1

k

]≥2

. (43)

Here[mn

]≥2

means a 2-associated Stirling cycle number. It is gratifying to see Stirling

numbers in Stirling’s asymptotic series. [Even if it’s really due to de Moivre].6We found [45] by browsing the Monthly, not by citation search. Its criticism of [63] is largely sound:

Copson’s treatment is better in many respects.

January 2014] 15

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 16

Gaps: midpoint rule, Stirling’s original formula, and asymptotics of invΓWe saw in a previous section that several papers used the trapezoidal rule to esti-

mate lnn! by∫ n1

ln t dt; we used this to give a parameterized upper bound, namelyequation (39).

Nowhere in the Monthly that we have seen does the midpoint rule appear to be usedto give a lower bound for n!. The following theorem rectifies this omission.

Theorem 1. If 1 ≤ k ≤ n− 1, and

ck =k!ek+1/2

(k + 1/2)k+1/2, (44)

then

ck(n+ 1/2)n+1/2e−(n+

1/2) < n! . (45)

Proof. For a concave function, the midpoint rule gives an upper bound7, so if j ≥ 1∫ j+1/2

j−1/2

ln t dt < ln j . (46)

Using panels of width 1, if k < n,∫ n+1/2

k+1/2

ln t dt <n∑

j=k+1

ln j . (47)

Adding∑k

j=1 ln j to both sides,

(n+ 1/2) ln(n+ 1/2)− (n+ 1/2)− (k + 1/2) ln(k + 1/2) + (k + 1/2) (48)

+k∑j=1

ln j <n∑j=1

ln j

or

ln ck + (n+ 1/2) ln(n+ 1/2)− (n+ 1/2) < lnn! (49)

Exponentiating gives the theorem. \

Remark. We now consider what happens when k = n or m = n: the inequalitiesbecome equality, and we learn n! = n! which is not a surprise. But what if k > n,or m > n? In those cases the sense of the inequalities reverse because the integralschange sign:

dmnn+1/2e−n < n! < ck(n+ 1/2)n+

1/2e−(n+1/2) (50)

if both m > n and k > n. One can establish also that dm decreases and is boundedbelow by

√2π, while ck increases and is bounded above by

√2π; we have

√2πnn+

1/2e−n < n! <√

2π(n+ 1/2)n+1/2e−(n+

1/2) . (51)7This is in several texts, including [22]— but one place to learn it is by teaching from [93].

16 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 17

These bounds and the finitary bounds of the theorem, i.e.

ck

(n+

1

2

)n+ 12

e−(n+12 ) < n! < dmn

n+ 12 e−n (52)

if k,m < n, are similarly tight to those produced by examining the error term in thetrapezoidal rule (e.g. [48]).

Remark. The first draft of this paper contained the phrase “we believe this is new,although it’s difficult to be sure.” Jon read that and was skeptical. It turns out that hewas correct in part, but the story is interesting. Our first real clue was the paper [30]which gives, at the end, an approximation containing the characteristic factor (n −1/2)n−1/2 (for Γ(n), not n!). They attribute this result to Burnside [18], in 1917 (ahundred years ago!). But the form is much older than that, even: Stirling himself gives(using “`”, to denote the base–10 logarithm)

z`, z − az − a

24z+

7a

2880z3−&c . (53)

“added to half the logarithm of the circumference of the circle whose radius is one” inexample 2 of Proposition 28 [97, p. 151]. This is an expression for log10(n!) but herez = n + 1/2; the constant a is 1/ ln(10) and this means, in modern notation,

lnn! ∼ ln√

2π +

(n+

1

2

)ln

(n+

1

2

)(54)

−(n+

1

2

)− 1

24(n+ 1/2)+

7

2880(n+ 1/2)3− · · · .

(55)

This is not equation (28)! This is, as Tweddle points out in [96], a mid-point for-mula! Stirling did not explicitly use the midpoint rule or the concavity of logarithm toestablish an inequality; instead he used telescoping series, induction, and a (clear andalgorithmic) recipe for computing more terms to give his series. Apparently, de Moivrewas the first to give the simpler version that we call “Stirling’s formula” today, namelyequation (28).

The following theorem can be proved using very similar steps as equation (40) isproved in [103] and [88] (and is rather fun to do). We leave this for the reader.

Theorem 2. For Re z > 1/2,

ln Γ(z) = (z − 1/2) ln(z − 1/2)− (z − 1/2) + ln√

+

∫ ∞t=0

1

t

(1

t− 1

2 sinh t/2

)e−(z−1/2)t dt . (56)

This should be contrasted to equation (40); the known series expansion for csch(z)(see e.g. [1]) can then be used to fully develop Stirling’s original formula, after anappeal to Watson’s lemma [9]:∫ ∞

t=0

1

t

(1

t− 1

2 sinh t/2

)e−(z−1/2)t dt

January 2014] 17

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 18

∼∑n≥1

(1− 21−2n)

2n(2n− 1)

B2n

(z − 1/2)2n−1(57)

∼ −1

24(z − 1/2)+

7

2880(z − 1/2)3− 31

40320(z − 1/2)5+ · · · (58)

Burnside [18] gave, by entirely different means, the formula

ln Γ(N + 1) = (N + 1/2) ln(N + 1/2)−N + ln

√2π

e

−∑r≥1

∑n≥N+1

1

2r(2r + 1)22rn2r, (59)

which, being convergent, gives therefore a double sum for this Binet-like integral when−1 + z = N is an integer. Burnside did not comment on the similarity to Stirling’soriginal formula. He did, however, compute a constant

C =1

2ln 2 +

∑r≥1

∑n≥1

1

2r(2r + 1)22rn2r(60)

as “to six figures” as 0.418938, and then identified it as ln√

2π/e = 0.418938533 . . .using “Stirling’s Theorem”, but using NN+1/2 not (N + 1/2)N+1/2. This suggeststhat he did not realize that his formula was actually closer to Stirling’s original.

Asymptotics of invΓ The first few terms of Stirling’s original formula give

ln Γ(z) =

(z − 1

2

)ln

(z − 1

2

)−(z − 1

2

)+ ln

√2π +O

(1

z

). (61)

We wish to solve x = Γ(y) for y when x is large.Put v = x/

√2π and u = y − 1/2. Then the formula above gives

ln v = u lnu− u+O(1/u) . (62)

Ignoring the O(1/u) term, we have

ln v.= u lnu− u = u(lnu− 1) = u ln

u

e(63)

and, somewhat remarkably, we can solve this for u, as follows:

ln v

e=u

elnu

e=

(lnu

e

)elnu/e (64)

so (using the Lambert W function)

lnu

e= W

(ln v

e

). (65)

18 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 19

Exponentiating,

u

e= eW (ln v/e) =

ln v/e

W

(ln ve

) . (66)

Therefore

y0 =1

2+

ln(x/√

2π)

W(1e

ln(x/√

2π)) . (67)

This formula approximately inverts Γ, so x .= Γ(y0). Using James Stirling’s own ex-

ample, 1000! or Γ(1001).= 4.0238 · 1023567, the formula above gives 1000.99999397,

a relative error of about 6 · 10−9, from the computed value of 1000!.The branch ofW used above is the principal branch,W0(x), defined for−1/e ≤ x

and satisfying W0(x) ≥ −1. Thus ln(x/√

2π)/e ≥ −1/e, or x ≥√

2π/e.At x =

√2π/e, y0 = 1/2 − 1/W0(−1/e) = 1/2 + 1 = 3/2. This states that x =

Γ(y0) should be approximately true when x =√

2π/e and y0 = 3/2. We can checkthis: Γ(3/2) = Γ(1/2)/2 =

√π/2. Now

√2π/e

.= 0.922137,

√π/2

.= 0.88622.

These differ only by about 4%. Note that this accuracy is attained at the lowest possiblevalue of x for which the formula is valid at all, and that (as we shall see) the errordecays reasonably rapidly as x → ∞. This is very nearly a universal formula. Ofcourse this is because Stirling’s formula is so accurate8.

But it gets better. For −1/e ≤ ln(x/√

2π)/e < 0, we may use W−1(x) as well.That is, on

√2π

e≤ x <

√2π (68)

the formula

y(−) =1

2+

ln(x/√

2π)

W−1

(1e

ln

(x√2π

)) (69)

also inverts Stirling’s original formula. Plotting, on the same graph as invΓ, we get thepicture in figure 7. The agreement is astonishing.

We claim but do not prove here (this paper is already too long) that the relative errorin y is O(1/y2) as x→∞; more precisely, the next two terms in the series are

y =1

2+ u0 +

1

24u0(1 + w)− 5 + 10(1 + w) + 14(1 + w)2

5760(1 + w)3u30

+ · · · (70)

where u0 = ln(x/√

2π)/w with w = W0(ln(x/√

2π)/e). There is a surprising con-nection to one of the series in [98], but this will be discussed another day.

8We remind the reader that divergent series are often remarkably accurate. There are two relevant limits,only one of which might be bad. However, Stirling’s formula is famously accurate, more so than most. AndStirling’s original formula is even better, because the midpoint rule is twice as accurate.

January 2014] 19

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 20

Figure 7. A plot showing that inverting Stirling’s original approximation for n! gives an astonishing accu-racy even for small x; by using both real branches of the Lambert W function, the asymptotically accurateapproximation even correctly (qualitatively) gets the “turning the corner”, up from x =

√2π/e to x =

√2π.

The inverse Gamma function invΓ is in black (solid line), the fromula (67) in red (dotted line), and the otherbranch from (69) in blue (dashed line).

We remark that de Moivre’s simpler formula

ln Γ(z) ∼ z ln z − 1

2ln z − z + ln

√2π (71)

is not as simple to invert:

ln

(x√2π

).=

(y − 1

2

)ln y − y (72)

doesn’t have a solution in terms of Lambert W , and thus we’re forced to approximate:

ln

(x√2π

).= y ln y − y − 1

2ln y , (73)

and ignoring the −1/2 ln y, we get the same equation as before, but now

y =ln(x/

√2π)

W

(1e

lnx/√

) (74)

which always differs by 1/2 from the previous.

Drawing the line somewhere We could have included here a look at [5], [34], [39],[40], [41], [56], [75], [105], or for that matter [55], but no. Read them yourselves!

4. CONCLUDING REMARKS This has been an amazing journey for us, throughthe Monthly and through a selection of the vast Γ literature. The Γ bibliography at

20 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 21

milanmerkle.com had 986 entries when we accessed it. This present survey has fo-cussed on Monthly papers, with some others for context. Diego Dominici’s survey ofStirling’s formula [29] attempted some of this, and we found his paper (in the Notadi Matematica) helpful; but indeed this whole project was a wonderful excuse to readgreat mathematical works. The ostensibly novel contributions of this paper (the pic-tures of the Riemann surface for invΓ, the asymptotic formula for invΓ, and the ele-mentary bracketing inequality (33) for n! that has approximations to Stirling’s originalformula on the left and de Moivre’s simpler formula that we call “Stirling’s formula”on the right), are small in comparison.

Stirling’s original series for n! is largely unknown, although the historians haveit right; and Wikipedia correctly attributes the series popularly known as “Stirling’sformula” to de Moivre. For more information on de Moivre’s contributions, see [8].Recently, Peter Luschny [61] and Weiping Wang [98] have started calling the exponen-tiated version of Stirling’s original formula by the name “the de Moivre formula” [98,pg. 584]! In view of similar historical misnamings (Euler invented Newton’s method;Newton invented (symplectic) Euler’s method, for instance [99]), we’re ok with this.

After writing this paper, we discovered that David W. Cantrell in 2001 [19] foundthe asymptotic formula for invΓ, before us. However, we then found that it’s alsoin [42], beating us all by decades!

Dedicated to the memory of Jonathan M. Borwein.

About the Paper I proposed the idea of this paper to Jon in late May 2016, andhe was immediately enthusiastic. Jon suggested that we start by scouring JSTOR forMonthly titles containing “Gamma” or “Stirling’s formula”. Later, we added the terms“factorial” and “psi” to the search. I wrote the first draft of the paper, containing theelements of every section except section 2, meaning to leave that to Jon. In our manylunchtime discussions of the evolving draft over the months of June and July, Jon mademany contributions, including pointing out connections to some of his early work. Healso suggested that one of my results in section 3 was not as ‘new’ as I had thought; asI now know, Jon was right.

Jon died early in the morning August 2, 2016, the week I was to pass the draft overto him. Jon’s influence on this paper is therefore much less than it could have been.Now we’ll just have to imagine what Jon would have done with section 2.

On a final note, the task that this paper attempts is impossible in reasonable time(and we both knew it). A sample of the Problems and Solutions section turns up Γ(z)or n! orψ more frequently than not, as the simplest rebuttal of a claim to completeness.But I like to think that this paper achieves 80% coverage. Had Jon lived, we might haveachieved 90%.

Judith Borwein has graciously permitted Jonathan’s name to be listed as author;certainly I feel it’s justified. It wasn’t just details: part of this paper was his vision.

ACKNOWLEDGMENT. This work was supported by Western University through a Distinguished VisitingResearch Fellowship for the first author, and by NSERC, the Fields Institute for Research in the Mathematicalsciences, the Rotman Institute for Philosophy, and the Ontario Research Centre for Computer Algebra for thesecond. The manuscript was typed by Julia E. Jankowski and Chris Brimacombe.

References

1. M. Abramowitz, I. A. Stegun, et al. Handbook of mathematical functions. Ap-plied mathematics series, 55:62, 1966. http://dlmf.nist.gov.

January 2014] REFERENCES 21

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 22

2. P. Ahern and W. Rudin. Geometric properties of the Gamma function. thisMONTHLY, 103(8):678–681, 1996.

3. M. I. Aissen. Some remarks on Stirling’s formula. this MONTHLY, 61(10):687–691, 1954.

4. R. Askey. Ramanujan’s extensions of the Gamma and Beta functions. thisMONTHLY, 87(5):346–359, 1980.

5. C. Axness, B. Kerr, and J. F. Chamayou. Incomplete Gamma and error functions:10977. this MONTHLY, 111(5):445–447, 2004.

6. W. de Azevedo Pribitkin. Laplace’s integral, the Gamma function, and beyond.this MONTHLY, 109(3):235–245, 2002.

7. M. A. Basoco. On certain finite sums of binomial coefficients and Gamma func-tions. this MONTHLY, 37(5):241–245, 1930.

8. D. R. Bellhouse. Abraham de Moivre: Setting the stage for classical probabilityand its applications. CRC Press, 2011.

9. C. M. Bender and S. A. Orszag. Advanced mathematical methods for scientistsand engineers I. Springer Science & Business Media, 1999.

10. B. C. Berndt. The Gamma function and the Hurwitz zeta-function. thisMONTHLY, 92(2):126–130, 1985.

11. M. Bhargava. The factorial function and generalizations. this MONTHLY, 107(9):783–799, 2000.

12. C. R. Blyth and P. K. Pathak. A note on easy proofs of Stirling’s theorem. thisMONTHLY, 93(5):376–379, 1986.

13. J. M. Borwein and S. T. Chapman. I prefer pi: A brief history and anthology of ar-ticles in the American Mathematical Monthly. American Mathematical Monthly,122(3):195–216, 2015.

14. J. M. Borwein and I. J. Zucker. Elliptic integral evaluation of the Gamma func-tion at rational values of small denominator. IMA Journal of Numerical Analysis,12(4):519–526, 1992. http://dx.doi.org/10.1093/imanum/12.4.519.http://imajna.oxfordjournals.org/content/12/4/519.abstract.

15. Jonathan M. Borwein and Robert M. Corless. Emerging tools for experimentalmathematics. this MONTHLY, 106(10):889–909, 1999.

16. S. Brassesco and M. A. Mendez. The asymptotic expansion for n! and the La-grange inversion formula. The Ramanujan Journal, 24(2):219–234, 2011.

17. C. J. Brookes. Functions satisfying a certain type of reciprocity of derivatives.this MONTHLY, 74(5):578–580, 1967.

18. W. Burnside. A rapidly convergent series for log n!. Messenger Math, 46:157–159, 1917.

19. D. W. Cantrell. 23 kt. asymptotic expansion for gamma function, 2001.20. A. J. Coleman. A simple proof of Stirling’s formula. this MONTHLY, 58(5):

334–336, 1951.21. E. T. Copson. An introduction to the theory of functions of a complex variable.

The Clarendon press, 1935.22. R. M. Corless and N. Fillion. A Graduate Introduction to Numerical Methods:

From the Viewpoint of Backward Error Analysis. Springer New York, 2013.23. R. M. Corless and D. J. Jeffrey. Graphing elementary Riemann surfaces. ACM

SIGSAM Bulletin, 32(1):11–17, 1998.24. R. M. Corless, D. E. G. Hare, D. J. Jeffrey, G. H. Gonnet, and D. E. Knuth. On the

Lambert W function. Advances in Computational Mathematics, 5(1):329–359,1996. http://dx.doi.org/10.1007/BF02124750.

25. H.T. Davis. The approximation of logarithmic numbers. this MONTHLY, 64(8):11–18, 1957.

22 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 23

26. P. J. Davis. Leonhard Euler’s integral: A historical profile of the Gamma func-tion: In memoriam: Milton Abramowitz. this MONTHLY, 66(10):849–869, 1959.

27. E. Y. Deeba and D.M. Rodriguez. Stirling’s series and Bernoulli numbers. thisMONTHLY, 98(5):423–426, 1991.

28. P. Diaconis and D. Freedman. An elementary proof of Stirling’s formula. thisMONTHLY, 93(2):123–125, 1986.

29. D. Dominici. Variations on a theme by James Stirling. Note di Matematica, 28:1–13, 2006.

30. D. E. Dutkay, C. P. Niculescu, and F. Popovici. Stirling’s formula and its exten-sion for the Gamma function. this MONTHLY, 120(8):737–740, 2013.

31. S. Eger. Stirling’s approximation for central extended binomial coefficients. thisMONTHLY, 121(4):344–349, 2014.

32. W. Feller. A direct proof of Stirling’s formula. this MONTHLY, 74(10):1223–1225, 1967.

33. W. Feller. Correction to “a direct proof of Stirling’s formula”. this MONTHLY,75(5):518–518, 1968.

34. N. J. Fine. Binomial coefficients modulo a prime. this MONTHLY, 54(10):589–592, 1947.

35. T. Fort. The Gamma function with varying difference interval. this MONTHLY,73(9):951–959, 1966.

36. J. S. Frame. An approximation to the quotient of Gamma functions. thisMONTHLY, 56(8):529–535, 1949.

37. B. Fuglede. A sharpening of Wielandt’s characterization of the Gamma function.this MONTHLY, 115(9):845–850, 2008.

38. M. L. Glasser. 11426. this MONTHLY, 116(4):365–365, 2009.39. P. Goetgheluck. Computing binomial coefficients. this MONTHLY, 94(4):360–

365, 1987.40. S. W. Golomb. Iterated binomial coefficients. this MONTHLY, 87(9):719–727,

1980.41. S. W. Golomb. An identity for

(2nn

). this MONTHLY, 99(8):746–748, 1992.

42. Gaston H. Gonnet. Expected length of the longest probe sequence in hash codesearching. J. ACM, 28(2):289–304, April 1981. http://dx.doi.org/10.1145/322248.322254.

43. L. Gordon. A stochastic approach to the Gamma function. this MONTHLY, 101(9):858–865, 1994.

44. D. Gronau. Why is the Gamma function so as it is. Teaching Mathematics andComputer Science, 1:43–53, 2003.

45. N. Grossman. Letters to the editor. this MONTHLY, 98(3):233–234, 1991.46. P. Henrici. Applied and Computational Complex Analysis, volume II of Applied

and Computational Complex Analysis. Wiley, 1977.47. G. Huber. Gamma function derivation of n-sphere volumes. this MONTHLY, 89

(5):301–302, 1982.48. P. M. Hummel. A note on Stirling’s formula. this MONTHLY, 47(2):97–99, 1940.49. E. Jahnke and F. Emde. Tables of Functions (with formulae and curves). Dover,

New York, 1945.50. G. J. O. Jameson. Inequalities for Gamma function ratios. this MONTHLY, 120

(10):936–940, 2013.51. H. Jeffreys and B. Jeffreys. Methods of Mathematical Physics. Cambridge Uni-

versity Press, 1972.52. R. Johnsonbaugh. The trapezoid rule, Stirling’s formula, and Euler’s constant.

this MONTHLY, 88(9):696–698, 1981.

January 2014] REFERENCES 23

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 24

53. R. A. Khan. A probabilistic proof of Stirling’s formula. this MONTHLY, 81(4):366–369, 1974.

54. D. E. Knuth. A permanent inequality. this MONTHLY, 88(10):731–740, 1981.55. D. E. Knuth. Two notes on notation. this MONTHLY, 99(5):403–422, 1992.56. J. Konvalina. A unified interpretation of the binomial coefficients, the Stirling

numbers, and the Gaussian coefficients. this MONTHLY, 107(10):901–910, 2000.57. C. Lanczos. A precision approximation of the Gamma function. SINUM, Series

B: Numerical Analysis, 1(1):86–96, 1964.58. L. J. Lange. An elegant continued fraction for π. this MONTHLY, 106(5):456–

458, 1999.59. D. Laugwitz and B. Rodewald. A simple characterization of the Gamma func-

tion. this MONTHLY, 94(6):534–536, 1987.60. H. Lou. A short proof of Stirling’s formula. this MONTHLY, 121(2):154–157,

2014.61. P Luschny. Approximation formulas for the factorial function n!, 2012. http:

//www.luschny.de/math/factorial/approx/SimpleCases.html.62. A. J. Maria. A remark on Stirling’s formula. this MONTHLY, 72(10):1096–1098,

1965.63. G. Marsaglia and J. C. W. Marsaglia. A new derivation of Stirling’s approxima-

tion to n!. this MONTHLY, 97(9):826–829, 1990.64. R. Michel. On Stirling’s formula. this MONTHLY, 109(4):388–390, 2002.65. R. Michel. The (n+ 1)th proof of Stirling’s formula. this MONTHLY, 115(9):

844–845, 2008.66. C. C. Mumma II. n! and the root test. this MONTHLY, 93(7):561–561, September

1986. http://dx.doi.org/10.2307/2323037.67. V. Namias. A simple derivation of Stirling’s asymptotic series. this MONTHLY,

93(1):25–29, 1986.68. T. S. Nanjundiah. Note on Stirling’s formula. this MONTHLY, 66(8):701–703,

1959.69. T. S. Nanjundiah. Note on the Beta and Gamma functions. this MONTHLY, 76

(4):411–413, 1969.70. R.B. Nelsen. Letters to the editor. this MONTHLY, 96(6):510–511, 1989.71. G. Nemes. On the coefficients of the asymptotic expansion of n!. Journal of

Integer Sequences, 13:1–5, 2010.72. T. Neuschel. A new proof of Stirling’s formula. this MONTHLY, 121(4):350–

352, 2014.73. T. A. Newton. Derivation of a factorial function by method of analogy. this

MONTHLY, 68(9):917–920, 1961.74. A. Nijenhuis. Short Gamma products with simple values. this MONTHLY, 117

(8):733–737, 2010.75. C. S. Ogilvy. The Beta function. this MONTHLY, 58(7):475–479, 1951.76. F. W. J. Olver, D. W. Lozier, R. F. Boisvert, and C. W. Clark. NIST Handbook of

Mathematical Functions. C. U. P, 2010. http://dlmf.nist.gov.77. J. M. Patin. A very short proof of Stirling’s formula. this MONTHLY, 96(1):

41–42, 1989.78. H. L. Pedersen. Inverses of Gamma functions. Constructive Approximation, 41

(2):251–267, 2015. http://dx.doi.org/10.1007/s00365-014-9239-1.79. M. A. Pinsky. Stirling’s formula via the Poisson distribution. this MONTHLY,

114(3):256–258, 2007.80. N. Pippenger. An infinite product for e. this MONTHLY, 87(5):391–391, 1980.81. R. Remmert. Wielandt’s theorem about the Γ-function. this MONTHLY, 103(3):

24 © THE MATHEMATICAL ASSOCIATION OF AMERICA [Monthly 121

Mathematical Assoc. of America American Mathematical Monthly 121:1 March 17, 2017 12:18 a.m. BorweinCorlessGamma.tex page 25

214–220, 1996.82. H. Robbins. A remark on Stirling’s formula. this MONTHLY, 62(1):26–29, 1955.83. B. Ross. Serendipity in mathematics. this MONTHLY, (8):562–566.84. F. E. Ross. An application of Stirling’s interpolation formula. this MONTHLY,

12(2):43–44, 1905.85. L. A. Rubel. A survey of transcendentally transcendental functions. this

MONTHLY, 96(9):777–788, 1989.86. H. Ruben. A note on the trigamma function. this MONTHLY, 83(8):622–623,

1976.87. B. Salvy. The dynamic dictionary of mathematical functions. In

AISC/MKM/Calculemus, page 13, 2010.88. Z. Sasvari. An elementary proof of Binet’s formula for the Gamma function. this

MONTHLY, 106(2):156–158, 1999.89. T. Schmelzer and L. N. Trefethen. Computing the Gamma function using contour

integrals and rational approximations. SIAM Journal on Numerical Analysis, 45(2):558–571, 2007.

90. E. Snapper. Inverse functions and their derivatives. this MONTHLY, 97(2):144–147, 1990.

91. J. L. Spouge. Computation of the Gamma, digamma, and trigamma functions.SIAM Journal on Numerical Analysis, 31(3):931–944, 1994.

92. G. K. Srinivasan. The Gamma function: An eclectic tour. this MONTHLY, 114(4):297–315, 2007.

93. J. Stewart. Calculus. Cengage Learning, 7 edition, 2015.94. M. Trott. Visualization of Riemann surfaces of algebraic functions. Mathematica

in education and research, 6(4):15–36, 1997.95. M. Trott. Trott’s corner: Visualization of Riemann surfaces iid: Compositions of

elementary transcendental functions. The Mathematica Journal, 8(3), 2002.96. I. Tweddle. Approximating n!: Historical origins and error analysis. American

Journal of Physics, 52(6):487–488, 1984.97. I. Tweddle. James Stirling’s methodus differentialis: an annotated translation of

Stirling’s text. Springer Science & Business Media, 2003.98. W. Wang. Unified approaches to the approximations of the Gamma function.

Journal of Number Theory, 163:570–595, 2016.99. G. Wanner. Kepler, newton and numerical analysis. Acta Numerica, 19:561–598,

2010.100. E. Wegert. Visual complex functions: an introduction with phase portraits.

Springer Science & Business Media, 2012.101. E. Wegert and G. Semmler. Phase plots of complex functions: a journey in illus-

tration. Notices of the American Mathematics Society, 58:768–780, 2010.102. J. G. Wendel. Note on the Gamma function. this MONTHLY, 55(9):563–564,

1948.103. E. T. Whittaker and G. N. Watson. A Course of Modern Analysis. Cambridge

University Press, 1902.104. H. S. Wilf. What is an answer? this MONTHLY, 89(5):289–292, 1982.105. S. Wolfram. Geometry of binomial coefficients. this MONTHLY, 91(9):566–571,

1984.106. C. S. Wong. A note on the central limit theorem. this MONTHLY, 84(6):472–472,

1977.107. D. Zeitlin. An application of Stirling’s formula. this MONTHLY, 66(8):718–719,

1959.

January 2014] REFERENCES 25