A curious identity arising from Stirling’s formula and saddle-point method on two different contours

We prove the curious identity in the sense of formal power series: Z 1

.i t/ j j y j 2

1
A dt; for m D 0; 1; : : : , where OEy m f .y/denotes the coefficient of y m in the Taylor expansion of f , which arises from applying the saddle-point method to derive Stirling's formula.The generality of the same approach (saddle-point method over two different contours) is also examined, together with some applications to asymptotic enumeration.Mathematics Subject Classifications: 05A16, 05A15, 41A60

Introduction
The following unusual identity was discovered through different manipulations of the saddlepoint method in order to derive Stirling's formula, which has a huge literature since de Moivre's and Stirling's pioneering analysis almost three centuries ago; see for example the survey [2] (and the references therein) and the book [10] for five different analytic proofs.Denote by OEy m f .y/ the coefficient of y m in the Taylor expansion of f .
.i t / j j !y j 2 Ã dt; (1) the electronic journal of combinatorics 30 (2023), #P00 and .i t/ j j y j 2 Ã dt: (2) Then c m D d m .mD 0; 1; : : : /: While the identity (3) can be deduced from known expansions for n! (e.g., [4,24]), our formulation, as well as the proof given here, is new and of independent interest per se.More precisely, the essential differences between Theorem 1 and the results in [4] are: the proofs in [4] rely on Cauchy's integral representation, as we will do for c 2m , and a Gamma integral for n!, which is in contrast different from ours.Our analysis, based on Cauchy's integral representation for Taylor coefficients under two different types of integration contours, can be systematically extended to more general contexts, and is of additional instructional value as the same issue has perplexed many and has been left mostly unaddressed in the literature.We will examine, for simplicity, two simple frameworks useful for asymptotic enumeration in the next few sections and compare the numerical differences of the two expansions resulting from these analysis.
When m is odd, c m D d m D 0 because the coefficient of y m contains only odd powers of t .When m D 2l is even, the identity (3) can be written explicitly as follows: In particular, fc 2l g l 0 D 1; These Stirling coefficients have been extensively studied in the literature; see, e.g., [7, ~8.2], and [3,16,24,19], and the references cited there.
What if we interchange the integral and the coefficient-extraction operator OEy m in (1)?Indeed, the integral in (1) without the operator OEy m is divergent for y 2 R n f0g due to periodicity: on the other hand, the integral in (2) without OEy m is absolutely convergent for real jyj < 1: e i t=y dt: Proof of Theorem 1.For convenience, we write for some generic " > 0 whose value is immaterial.
The standard asymptotic expansion.We begin with the Cauchy integral representation for n! 1 : where the integration contour is the circle with radius jzj D n.The standard application of the saddle-point method (see [10, p. 555]) proceeds by first making the change of variables z 7 !ne u , giving e n.e u 1 u/ du: (5) Now by the change of variables u D i t p n , we have , say, then n" 2 n ! 1 and n" j n !0 for j 3, so that the series on the right-hand side is small on the integration path; we can then expand the exponential of this series in decreasing powers of n, and then extending the integration limits to infinity, yielding the expansion (4) with c 2m expressed in the formal power series form (1). See [10, Ex.VIII.3; p. 555 et seq.] for technical details.
On the other hand, a more effective means of computing c 2m is to make first the change of variables e u 1 u D 1 2 v 2 in the rightmost integral in (5), where u D u.v/ is positive when v is, and is analytic in jvj "; see [27, ~3.6.3].Then Then a direct application of Watson's Lemma (see [29, ~1.5]) gives the asymptotic expansion where We then obtain the relation Second asymptotic expansion.It is well known that n! 1 has the alternative Laplace integral representation (see [28, p. 246]): .R > 0/; so that, by the change of variables z D R.1 C x/, where R D n C 1, e .nC1/.log.1Cx/x/ dx: Now by the change of variables x D i t p nC1 , we have By a similar procedure described above, we then deduce the asymptotic expansion the electronic journal of combinatorics 30 (2023), #P00 where d m is given in (2); compare (7).
On the other hand, by the change of variables log.1 C x/ x D 1 2 y 2 (y > 0 when x > 0), we have We thus deduce the relation which is easily computable by (10).
Equality of the two expansions.We next prove that where g m and h m are defined in ( 6) and (10), respectively.Note that for m 0 by a direct change of variables s D e t 1.Thus we show that for m ¤ 1, or, equivalently, Since m D 0; 1 are easily checked, we assume m 2. By the relation the electronic journal of combinatorics 30 (2023), #P00 we have which proves (13), and in turn (11).Consequently, c m D d m for m 0, implying (3).
Motivation.The observation that (see ( 4)) led us to investigate the different scales used in the saddle-point method, which turned out to correspond to the choice of different contours.Then we discovered the identity (3).
Asymptotics of g 2 m .It is known that (see [7, ~8.2] and [3]) This type of asymptotic behaviors is unusual for functions of Lagrangean type; see [14] or ~3.

Asymptotic expansions by the saddle-point method
Quoted from [10, p. 551] Saddle-point method D Choice of contour C Laplace's method.
Similar to its real-variable counterpart, the saddle-point method is a general strategy rather than a completely deterministic algorithm, since many choices are left open in the implementation of the method concerning details of the contour and choices of its splitting into pieces.

z
The two uses above (with z D r e iÂ or z D R.1Ci t/) of the saddle-point method for coefficient integrals of the form for some contour C are standard in the combinatorial literature and are reminiscent of the difference between moments (OEy m E.e X y /) and factorial moments (OEy m E.1 C y/ X ) in probability; the corresponding saddle-point equations are given by rf 0 .r/ f .r/ D n; and respectively.The question is often which one to choose and which one is better (for example, numerically)?For definiteness, consider f .z/D e e z 1 (Bell numbers [23, A000110]); then we found both uses in the literature: In particular, Knuth [15, pp. 422-423] considers first a n 1 and then changed n 1 to n after deriving the corresponding asymptotic approximation.The question of whether to use r or R in ( 14) has perplexed many users and is partly answered in [10, p. 555, footnote]: "the choice being often suggested by computational convenience."It is also commented in [21, p. 1184] that the use of r is slightly preferred because the manipulation of the other version is less elegant.
Apart from computational convenience, the numerical advantages of the expansion (9) over (7) are visible because they have the same sequence of coefficients and .nC 1/ m is always smaller than n m ; see also [5] for Stirling's original expansion for log n! in decreasing powers of n C 1 2 .Although the numerical difference is minor for most practical uses, the same question can naturally be raised more generally for functions f whose Taylor coefficients are amenable to the saddle-point method (for example, exponential of Hayman admissible functions; see [22]).Indeed, such a numerical difference was already observed in the 1960s by Harris and Schoenfeld in their study of idempotent elements in symmetric semigroups [11] where f .z/D e ze z .Based on numerical calculations, they found that the saddle-point approximation the electronic journal of combinatorics 30 (2023), #P00 is "considerably better than the approximation" r n e r e r p 2 r e r .r 2 C 3r C 1/ with r > 0 solving r .rC 1/e r D n. ( ) Surprisingly, this is the only paper we found where such a numerical comparison between the two versions of the saddle-point approximation was made.
In the same paper [11], Harris and Schoenfeld argued further that the reason that (") outperforms ( ) is (we change their notations to ours) "because the derivation of (") uses a contour which passes through the saddle point of a certain integral for a n =n!.However, Hayman's proof of the formula yielding ( ) employs a contour passing through r D r .n/D R.n 1/ and it therefore misses the saddle point at R by R.n/ R.n 1/ 1=n." However, such a comparison is not quite right.In fact, the use of r or R in each case, after the change of variables, is optimally guided by the saddle-point principle, so that a different choice of integration contour yields indeed a distinct expansion with non-identical asymptotic scales.As we will see below in ~2.4,while the dominant term in (") is numerically closer to the true value than that in ( ) under the absolute difference measure, the use of more terms in the corresponding asymptotic expansions may change the scenario, and which expansion is numerically more precise depends then on the number of terms used.
In this section, we first consider the two versions of the saddle-point method for general f , giving the corresponding asymptotic expansions with succinct expressions for the coefficients.Then we discuss some examples, highlighting briefly their numerical differences.
In particular, Odlyzko and Richmond showed in [22] that if is Hayman admissible, then the function e .z/ is Harris-Schoenfeld admissible, or in other words if a function .z/ is Hayman admissible, then an asymptotic expansion for the Taylor coefficients of e .z/can be obtained by the saddle-point method.

Two asymptotic expansions by the saddle-point method
We consider in this section the Taylor coefficient where R > 0 solves R 0 .R/ D n C 1, and Proof.For the integration on the vertical line, the asymptotic expansion follows from Harris-Schoenfeld admissibility, as guaranteed by Odlyzko and Richmond's theorem [22,Theorem 4] (with different expression for the coefficients).Then where the electronic journal of combinatorics 30 (2023), #P00 Note that 2 .t/D Ä 2 .t/.Thus ( 16) follows.
For the integration on a circle, we carry out the change of variables z 7 !r e iÂ .Then, by performing the same procedure as above, we have where Ä j .r/ WD j !OEs j ns C .r e s / .jD 1; 2; : : : /: From this we derive (15); see [18,30] for similar details.

Examples.
We begin with Harris and Schoenfeld's example .z/D ze z [11] and let a n WD n!OEz n e ze z , the number of idempotent mappings from a set of n elements into itself; see also [23, A000248].Asymptotic expansions by the saddle-point method can be justified either by checking the Harris-Schoenfeld admissibility conditions as in [11] or by showing that ze z is a Hayman admissible function (see [13,22,10]).We then compute the absolute differences between the true values and the two asymptotic expansions with varying number of terms: the electronic journal of combinatorics 30 (2023), #P00 where r > 0 solves r .rC 1/e r D n, R > 0 solves R.r C 1/e R D n C 1, and Ä 2 and the coefficients c m and d m can be computed by ( 15) and ( 16), respectively, with .z/D ze z .Note that g.2m/Ä 2 .r/ m grows in the order n m .logn/ m for m D 0; 1; : : : .From Figure 1, we see that while (") is numerically better than its circular counterpart ( ) (or M D 0, as already observed in [11]), more terms in the asymptotic expansions show that both expansions are indeed comparable, and their numerical performance depends on the number of terms used.
We also observed a very similar pattern (as Figure 1) for Bell numbers when .z/D e z 1; see [23, A000110].In the case of .z/D z 1 z , a n WD n!OEz n e z=.1 z/ enumerates the number of partitions of f1; : : : ; ng into any number of ordered subsets; see [23, A000262].Although Theorem 3 does not apply because z 1 z is not Hayman admissible, the justification of an asymptotic expansion is straightforward and similar to integer partition problems; see for example [1].One sees that the circular version is numerically better except for M D 0. Finally, consider the case .z/D z C 1 2 z 2 , whose coefficients (times n!) enumerate the number of self-inverse permutations on n elements; see [23, A000085].Since all coefficients of .z/are positive, an asymptotic expansion by the saddle-point method is possible by known results of Moser and Wyman in the 1950s [18]; see also [21].In this case, we plot the difference .c/n;M .v/n;M because the two curves are too close to be distinguishable.M D 0; 1; 2; 3 (in left to right order).Here ./ n;M is defined as in (17) but with n M C1 .logn/ M C1 there replaced by n M C1 .In summary, although no general theory is developed here as to which contour of the saddlepoint integral to choose when applying to concrete instances, the expressions given here can be readily coded, which then provide effective means for further numerical comparisons.Such a procedure will be of instructional value, in addition to its own methodological interests.

Consider now the Lagrangean form
OEz n f .z/with f D zG.f /; where G.0/ > 0. By the Lagrange inversion relation, the Taylor coefficients satisfy .n 1/: This is one of the rare classes of functions for which both the singularity analysis and the saddle-point method apply well (see [10, p. 590] and [14]) because of (18).Under the following sub-criticality conditions: OEz j G.z/ 0 and gcdfj W OEz j G.z/ > 0g D 1; the equation zG 0 .z/D G.z/ has a unique positive solution 0 2 .0;/ it is proved in [14] via singularity analysis that ; the electronic journal of combinatorics 30 (2023), #P00 where WD r G.r / with r > 0 solving the equation r G 0 .r/ D G.r /.Here we examine this framework from the saddle-point method viewpoint.It turns out that the two asymptotic expressions we obtained above via two different contours are the same in this framework, and they are related to each other by a direct change of variables.Theorem 4. Write .z/D log G.z/.Under the subcriticality conditions (19), where R > 0 solves the equation R The expression for the coefficients in the expansion (20) is much simpler than that given in [14, Theorem 2].
Proof.We work out the asymptotic expansion in the circular case, the vertical line case then following from a change of variables.As an asymptotic expansion of the form (20) can either be justified by the singularity analysis as in [14] or by the standard saddle-point analysis as in [8], we focus here on the (formal) calculation of the coefficients.By ( 18) We then deduce that where By the change of variables v D e t 1, we obtain the expression (21), which can also be obtained directly by beginning with the coefficient integral with the change of variables z D R.1 C v/.
the electronic journal of combinatorics 30 (2023), #P00 In particular, if .z/D z or G.z/ D e z , then and we obtain the same expressions as derived above for Stirling's formula.

Catalan numbers
For simplicity, we consider only Catalan numbers for which G.z/ D .1 z/ 1 or .z/D log.1 z/, so that Then the positive solution of the equation r 0 .r/ D 1 is given by r D 1 2 , and from either the equation ( 21) or ( 23 On the other hand, by singularity analysis (see [10])

2 I
and (with j D j .R/)

Figure 3 :there replaced by n 1 2
Figure 3: .c/n;M (in red) vs .v/n;M (in blue) in the case of .z/D z 1 z : 10 n 200 and M D 0; 1; 2; 3; 4 (in left to right order).Here ./ n;M is defined as in (17) but with n M C1.log n/ M C1

;
), we have the asymptotic expansion ( .R/ 2 D 2) for m 0, which follows simply by the change of variables y D e v 1.Note particularly that h 2lC1 D 0 for l 0.

:
By a direct change of variables, we also have the expressionh 2m D 4 m OEy m .2ey 1/ r y 1 e y : (6)hough the definition of h m looks very different from that of g m (see(6)), their numerical values coincide except for m D 1: 2 .nC1/t 2 h.i t/ dt; where h.y/ D dx dy is analytic in jyj ".Again, by the Lagrange inversion formula, h m WD OEy m h.y/ D OEy m where r > 0 solves the equation r 0 .r/ D n, Ä 2 .r/ D r 0 .r/ C r 2 00 .r/ and r e u // n du where .r/ 2 WD r 0 .r/ C r 2 00 .r/, r 0 .r/ D 1, g.v/ D e where b m D OEt m .1 e t /=t It follows that h 2m D .2mC1/bm , which can also be proved directly by a change of variables.For large m, it is known (see[20, p. 39]) that implying that the expansion (24) is divergent for n 1.Since the right-hand side is zero when m is even, we can refine the approximation by the same singularity analysis and obtainb m .1/b 1 2 mc .2/man expansion containing only even terms.Yet another way to derive an asymptotic expansion for Catalan numbers is as follows.Let G.z/ D .1 C z/ 2 .