Periods of iterations of mappings over finite fields with restricted preimage sizes 7 Rodrigo S. V. Martins∗ Daniel Panario † 1 0 DepartamentoAcadˆemico de School of Mathematics and Statistics 2 Matema´tica, UTFPR Carleton University,Canada n Rua Marc´ılio Dias 635, 86812-460, 1125 Colonel By Drive, Ottawa, a Apucarana, PR, Brazil ON K1S 5B6, Canada J 1 [email protected] [email protected] 3 Claudio Qureshi‡ Eric Schmutz ] Instituteof Mathematics, Statistics Math Department,Drexel University O and ScientificComputing, UNICAMP 3141 Chestnut Street, Philadelphia C Rua S´ergio Buarque deHolanda 651, 19104 United States . h 13083-859, Campinas, SP, Brazil, [email protected] t a [email protected] m [ February 1, 2017 1 v 8 4 Abstract 1 9 Let [n]={1,...,n} and let Ωn be the set of all mappings from [n] to itself. Let f be a random 0 uniform element of Ωn and let T(f) and B(f) denote, respectively, the least common multiple and . theproductofthelengthofthecyclesoff. Harrisprovedin1973thatlogTconvergesindistribution 1 toastandardnormaldistributionand,in2011, E.Schmutzobtainedanasymptoticestimateonthe 0 logarithmoftheexpectationofTandBoverallmappingsonnnodes. Weobtainanalogousresults 7 for random uniform mappings on n = kr nodes with preimage sizes restricted to a set of the form 1 {0,k}, where k = k(r) ≥ 2. This is motivated by the use of these classes of mappings as heuristic : v models for the statistics of polynomials of the form xk+a over the integers modulo p, with p ≡ 1 Xi (mod k). Wealso exhibit and discuss ournumerical results on thisheuristic. r a 1 Introduction Let f : [n] [n] be a function of a finite set to itself; such functions are called mappings in this work. → The iterations of mappings has attracted interest in recent years due to applications in areas such as physics, biology, coding theory and cryptography. For instance, every polynomial f over a finite field F is a particular case of a mapping, and there are a number of applications where one considers the p iterations of polynomials over finite fields. We highlight Pollard’s classical factorization method for integers, which is based on iterations of quadratic polynomials; it allowed Brent and Pollard to obtain thepreviouslyunknownfactorizationoftheeighthFermatnumber. TheadaptationofPollard’smethod to the discrete logarithmproblem also relies oniterations of mappings; it is consideredby some authors the best attack on the elliptic curve version of this problem [24]. ∗ResearchsupportedbyCAPES-ProcessnumberBEX8267/13-8. †ResearchpartiallyfundedbyNSERCofCanada. ‡ResearchpartiallyfundedbyFAPESPgrants2015/26420-1 and2013/25977-7 In this work we focus on asymptotic results on the cycle structure of these dynamical systems. Let f = f(0) be a mapping on n elements and consider the sequence of functional compositions f(m) = f f(m 1), m 1. Since there arefinitely manymappings onn elements, there exists anintegerT such − ◦ ≥ that f(m+T) =f(m) forall m n. The leastinteger T =T(f) satisfying this conditionequals the order ≥ ofthe permutationobtainedby restrictingthe mappingf to its cyclicvertices. Erdo¨sandTur´anproved in [10] that the logarithm of the corresponding random variable defined over the symmetric group S n converges in distribution to a standard normal distribution, when properly centered and normalized. By adapting Erdo˝s and Tur´an’s “statistical group theory approach” [10], Harris was able to prove that the normalizedrandomvariable (logT µ )/σ , where µ = 1log2√n andσ = 1 log3/2√n, defined − ∗n n∗ ∗n 2 n∗ √3 over the space of mapping with uniform distribution, converges in distribution to a standard normal distribution [15]. The expected value of T was estimated in [22]: n logE (T)=k 3 1+o(1) , (1) n 0 log2n r (cid:0) (cid:1) wherek isaconstantdeterminedexplicitlythatisapproximately3.36. TheparameterTcanbeproven 0 to be the least common multiple of the cycle lengths of the components of the functional graph of f. If B(f) is the product of all cycle lengths of f including multiplicities, then one might consider B as an approximation for T. For instance, Proposition 1.2 of [22] implies that, for any δ > 0, the sequence of random variables defined by logB logT X = − , n 1, n log1+δn ≥ converges in probability to zero. However, it is proved in [22] that the expectation of B deviates significantly from the expectation of T: 3 logE (B)= √3n 1+o(1) . (2) n 2 (cid:0) (cid:1) In this paper we derive similar results for the classes of 0,k -mappings,k 2, defined as mappings { } ≥ f : [n] [n] such that f 1(y) 0,k for all y [n]. We note that this is equivalent to restricting − → | | ∈ { } ∈ the indegrees of the functional graph of f to the set 0,k . In [2,18] the authors consider the case { } where k is a fixed integer. Although this case is arguably of the most interest due to connections with polynomials over finite fields, we derive our results in a more general context, as explained in Section 2, where k is allowed to approach infinity together with n. This might be desirable, for example, when modeling polynomials whose degree depends on the size of the prime p; see [8] for an example where this occurs. We obtain asymptotic estimates for the logarithm of the expected value of T and B over 0,k -mappingsonnnodes. WealsoproveananalogueofHarris’result[15]for 0,k -mappings,thatis, { } { } weprovethat logTconvergesindistributionto astandardnormaldistribution, whenproperlycentered and normalized. An analogous result is obtained for the parameter B. By now there is a rather large literature on the asymptotic distribution of random variables defined on mappings with indegree restrictions. One motivation is methodological. Random mappings are important examples that serve as benchmarks for both probabilistic and analytic methods. On the analytic side, combinatorialmethods can be used to identify generating functions whose coefficients are the quantities of interest. In many cases it is possible to estimate the coefficients asymptotically using complexanalysis. Astandardreferenceis[12], whichincludes severalapplicationsto randommappings. See also [11,16]. In another direction, random mappings correspond to a large class of random graphs G forwhichthejointdistributionofcomponentssizescanberealizedasindependentrandomvariables, f conditioned on the number of vertices that the graph has. Stein’s method of coupling has been used to prove strong and general results [3,4]. One application of this theory is a generalizationof the theorem of Harris [15] that was mentioned above. However the proofs in our paper are elementary, and do not directly use any of these probabilistic techniques (except indirectly by citing a theorem from [6]). The research on random mappings with such restrictions is motivated also by the Brent-Pollard heuristic,whereoneusestheseobjectsasamodelforthe statisticsofpolynomials. Itwasintroducedby 1 Pollard in the analysis of his factorization method: he conjectured that quadratic polynomials modulo large primes behave like random mappings with respect to their average rho length [19]. However, the indegree distribution of a class of mappings impacts heavily the asymptotic distribution of a number of parameters[2]. SinceitisknownthatthefunctionalgraphofaquadraticpolynomialoverF hasjustone p nodewithindegree1andtheremainingnodesaresplitinhalfbetweenindegrees0or2, 0,2 -mappings { } could provide a better heuristic model for quadratic polynomials; see [18] for a discussion of alternative models for the Brent-Pollard heuristic. Furthermore, the class of 0,k -mappings also provides a good heuristic model for polynomials of the form xk +a F [x] with p{ 1} (mod k). This heuristic model p ∈ ≡ was used in [7] to predict that Pollard’s method is sped up in some cases if these polynomials are used, eventually leading to the factorization of the eighth Fermat number. The discussion in [18] suggests that unrestricted mappings and 0,2 -mappings represent equally { } accurate models for the expected rho length of quadratic polynomials. This is the case because both classes of mappings present the same asymptotic average coalescence, defined as the variance of its distribution of indegrees under uniform distribution; see [2,18]. It is curious that the knowledge of the indegree distribution of these polynomials does not represent an improvement on the heuristic. An asymptotic estimate ona different parameter,such as B and T, representsthus an interesting problem: it could provide a significant deviation on the asymptotic behavior of these classes of mappings or reinforce the similarities between them. We exhibit our numerical results on the behavior of T and B over different classes of polynomials over finite fields and investigate different classes of mappings as heuristic models for the behavior of T and B over these classes of polynomials. This paper is organized as follows. In Section 2 we establish notation and present the basic results that are needed for our main theorems; they concern mostly the distribution of the parameter that correspondstothenumberofcyclicverticesofamapping. InSection3weproveanasymptoticestimate fortheexpectationofTover 0,k -mappings. Section4containstheanalogousresultfortheparameter { } B, whose proof is presented in the form of a sketch, since the arguments are very similar to the ones in the preceding section. In Section 5 we prove that the logarithm of both parameters T and B, when properly centered and normalized, converge in distribution to a standard normal distribution; we also prove in this section that logB logT, when properly normalized, converges in probability to zero. In − Section 6 we present theoretical and numerical results concerning the use of classes of 0,k -mappings { } as heuristic models for certain classes of polynomials. 2 Preliminary Results For f a mapping, let = (f) be the set of cyclic nodes of f and let Z = . In the proof of our Z Z |Z| asymptotic results we make extensive use of the law of total probability, splitting the space of random uniform 0,k -mappingsaccording to the value that the random variable Z assumes. In this section we { } presentandderivebasicresultsconcerningthedistributionofthisrandomvariableover 0,k -mappings. { } To avoid confusion, we index probabilities and expected values by the set of allowed indegrees of the class of mappings in question: N in the unrestricted case [22] or 0,k in our case. For example, the { } expected value of T over all mappings on n nodes is denoted by ENn(T), whereas En{0,k}(T) denotes the expectation of T over 0,k -mappings on n nodes. { } The following theorem gives an exact result on the distribution of Z over 0,k -mappings [21]. We { } note that a 0,k -mappingf of size n satisfies n=kr, where r 1 denotes the cardinality of the range { } ≥ of f. Also, the coalescence of f, defined as the variance of its distribution of indegrees under uniform distribution, satisfies f( 1)(y)2 k2 − λ=λ(f)= | | 1=r 1=k 1. n − n − − yX∈[n] Theorem 1 (Equation (3.17) of [21]). Let n = kr, λ = k 1 1 and 1 m r. A random uniform − ≥ ≤ ≤ 2 0,k -mapping on n nodes has exactly m cyclic nodes with probability { } 1 Pn{0,k}(Z=m)=λkm−1 mr−11 nm−1 − . (cid:18) − (cid:19)(cid:18) (cid:19) It is possible to extend the quantity above to real numbers using the Gamma function Γ(), since · n!=Γ(n+1) for any integer n 1 (see Chapter 6 of [1]): ≥ Γ(r) Γ(n m) Pn{0,k}(Z=m)=λmkm−1Γ(r m+1) Γ(−n) . (3) − We abuse notation when we write Pn{0,k}(Z = m) for non integer values of m, assuming this as the quantity given by Equation (3) instead of the probability of Z be equal to m (which is equal to zero). In this work we consider 0,k -mappings on n = kr elements, where r denotes the size of their { } range and k = k(r) is a sequence of integers satisfying k 2 for all r 1. Although n(r) and k(r) ≥ ≥ are functions of r, we omit this dependence on our notation and write simply n and k. We emphasize that all asymptotic calculations and results in this work are taken as r approaches infinity, unless said otherwise. We assume throughout the paper that, for some 0 < α < 1, k = o(n1 α) as r approaches − infinity, or equivalently, logn=O(log(n/λ)) where λ=k 1. − Lemma 1 below combines well known facts about the Gamma function Γ(z) and the Digamma function Ψ(z)= d logΓ(z) (see Chapter 6 of [1]). Lemma 2 is a simple consequence of Lemma 1 and is dz used in the calculations of Sections 3 and 4, so we state here for future reference. Lemma 1. (Chapter 6 of [1]) The Gamma function satisfies 1 1 logΓ(y)=ylogy y logy+ log(2π)+o(1), − − 2 2 as y approaches infinity. Moreover, let Ψ(z)bethederivative of logΓ(z). Then, as y approaches infinity, 1 ∞ 1 Ψ(y)=logy+O and Ψ′(x)= . y (x+k)2 (cid:18) (cid:19) k=0 X Lemma 2. Let Ψ(z) be the derivative of logΓ(z) and let n,k,r be integers such that n=kr. If x=o(r) then, as r approaches infinity, x x2 1 (i) Ψ(n x)=logn +O +O , − − n n2 n (cid:18) (cid:19) (cid:18) (cid:19) x x2 1 (ii) Ψ(r x)=logr +O +O , − − r r2 r (cid:18) (cid:19) (cid:18) (cid:19) x2 x3 (iii) logΓ(n x) logΓ(n)= xlogn+ +O +o(1), − − − 2n n2 (cid:18) (cid:19) x2 x3 (iv) logΓ(r) logΓ(r x+1)=xlogr logr +O +o(1). − − − − 2r r2 (cid:18) (cid:19) Proof. It follows directly from Lemma 1 that 1 x 1 Ψ(n x)=log(n x)+O =logn+log 1 +O . − − n x − n n (cid:18) − (cid:19) (cid:16) (cid:17) (cid:18) (cid:19) The estimate for Ψ(n x) follows directly from the estimate log(1 z)= z+O(z2), as z approaches − − − zero. The same argument proves the estimate for Ψ(h x). − 3 We prove now items (iii) and (iv). It follows from Lemma 1 that 1 1 logΓ(n x) logΓ(n)=(n x)log(n x) (n x) log(n x) nlogn+n+ logn+o(1). − − − − − − − 2 − − 2 We use the fact that log(n x)=logn+log(1 x/n) to obtain − − x 1 x logΓ(n x) logΓ(n)= xlogn+(n x)log 1 +x log 1 +o(1). − − − − − n − 2 − n (cid:16) (cid:17) (cid:16) (cid:17) Since x=o(r) implies x=o(n), we have log(1 x/n)=o(1). The expansion of log(1 z) then yields − − x x2 x3 logΓ(n x) logΓ(n)= xlogn+(n x) +O +x+o(1), − − − − −n − 2n2 n3 (cid:18) (cid:18) (cid:19)(cid:19) and hence, x2 x3 logΓ(n x) logΓ(n)= xlogn+ +O +o(1). − − − 2n n2 (cid:18) (cid:19) The estimate for logΓ(r) logΓ(r x+1) follows by the same arguments. − − ⊔⊓ In the following lemma we obtain an asymptotic estimate on the distribution of Z over 0,k - { } mappings; see [2] for a similar result in a more general setting. Lemma 3. Let λ=k 1. If m=m(r) is a sequence of positive integers such that m =o(r), then the − distribution of the number of cyclic nodes on a 0,k -mapping on n=kr nodes satisfies { } λm λm2 m3 P 0,k (Z=m)= exp +O +o(1) , n{ } n − 2n r2 (cid:18) (cid:18) (cid:19) (cid:19) as r approaches infinity. Moreover, if m = m(r) is a sequence of real numbers such that m and → ∞ m=o(r) as r , then Pn{0,k}(Z= m ), r 1, is asymptotically equivalent to the quantity above as →∞ ⌊ ⌋ ≥ r approaches infinity. Proof. Let S =logΓ(r) logΓ(r m+1) and S =logΓ(n m) logΓ(n). It follows from Equation 1 2 − − − − (3) that λm logP 0,k (Z=m)=log +mlogk+S +S . n{ } k 1 2 (cid:18) (cid:19) Since mlogk+mlogr mlogn=0, Lemma 2 implies − λm m2 m2 m3 logPn{0,k}(Z=m)=log k −logr− 2r + 2n +O r2 +o(1). (cid:18) (cid:19) (cid:18) (cid:19) The result follows from n=kr and λ=k 1. − Let m = m(n) be a sequence of real numbers such that m and m = o(r) as r . We note → ∞ → ∞ that m =m+O(1)=m(1+O(m 1))=m(1+o(1)). Since (1+O(m 1))2 =1+O(m 1), using the − − − ⌊ ⌋ first part of the lemma we obtain λm λm2 m3 Pn{0,k}(Z=⌊m⌋)= n (1+o(1))exp − 2n (1+O(m−1))+O r2 +o(1) (cid:18) (cid:18) (cid:19) (cid:19) λm λm2 λm m3 = exp +O +O +o(1) . n − 2n n r2 (cid:18) (cid:18) (cid:19) (cid:18) (cid:19) (cid:19) The result follows from the fact that, by hypothesis, λm/n=O(m/r)=o(1). ⊔⊓ 4 Lemma 4. Let n,k 2 be fixed integers such that n=kr for some r 1. Then there is a positive real ≥ ≥ number m such that the sequence (z ) defined by # m m z =P 0,k (Z=m), m 1, m n{ } ≥ is increasing for m<m and decreasing for m>m . Furthermore, m = n/λ+O(1). # # # Proof. Firstwenotethatz =0form>r. LetR =z /z ,1 m r,pbe the ratioofconsecutive m m m+1 m ≤ ≤ probabilities. It suffices to find a number m that R 1 for 1 m < m and that R 1 for # m # m ≥ ≤ ≤ m m r. Using Theorem 1 we obtain # ≤ ≤ n km m+1 R = − . m n m 1 m − − We note that R < 1 is equivalent to (n km)(m+1)< m(n m 1). Since n =kr and λ= k 1, m − − − − this is equivalent to n <m(m+1). (4) λ The function m m(m+1) assumes the value 0 if m = 0 and it approaches infinity when so does m. 7→ This function is monotone increasing, hence there exists a positive real number m such that R 1 # m ≥ for m < m and R < 1 for m > m . Since r(r+1) n/λ, then m r. This proves the first part # m # # ≥ ≤ of the lemma. We can explicitly calculate m by solving Equation (4) as a quadratic equation for m: # 1 1 n 1/2 n k m = + 1+4 = 1+O . # −2 2 · λ λ n (cid:16) (cid:17) r (cid:18) (cid:18) (cid:19)(cid:19) ⊔⊓ In Section 5 we split the range [1,n] of possible values for Z in three intervals using sequences ξ =ξ (n) andξ =ξ (n), where [ξ ,ξ ]defines a sequence ofintervals thatbecome increasinglynarrow 1 1 2 2 1 2 aroundthemodem (seeLemma4). WeproveinLemma5belowthatZisconcentratedintheinterval # [ξ1,ξ2]. We observe that, for k 2 fixed, it is proved in [2] that En{0,k}(Z) πn/2λ, hence the mode ≥ ∼ m has the same order of growth than the expectation of Z. # p Lemma 5. Let εn =log−3/4( n/λ). If ξ1 =m1#−εn and ξ2 =m1#+εn, then, as r approaches infinity, (i) Pn{0,k}(Z<ξ1)=o(1),p (ii) Pn{0,k}(Z>ξ2)=o(1), (iii) Pn{0,k}(ξ1 Z ξ2) 1. ≤ ≤ ∼ Proof. Since ξ <m , we note that Lemma 4 implies 1 # P 0,k (Z<ξ )= P 0,k (Z=m) P 0,k (Z= ξ ), n{ } 1 n{ } ≤ n{ } ⌊ 1⌋ mX<ξ1 mX≤ξ1 and hence Pn{0,k}(Z<ξ1) ξ1Pn{0,k}(Z= ξ1 ). Therefore, by Lemma 3, ≤ ⌊ ⌋ λξ2 λξ2 ξ n P 0,k (Z<ξ ) 1 exp 1 1+O 1 +o(1) . (5) n{ } 1 ≤ n − 2n λr2 (cid:18) (cid:18) (cid:18) (cid:19)(cid:19) (cid:19) It follows from the definition of ξ and m that 1 # λξ12 λ n 2(1−εn) = n −εn =exp ε log n , n n ∼ n λ λ − λ (cid:18)r (cid:19) (cid:16) (cid:17) (cid:16) (cid:16) (cid:17)(cid:17) 5 hence, λξ2 n 1 =exp 23/4log1/4 =o(1). (6) n − λ Also, since r 1 =O(λ/n), (cid:16) (cid:16) (cid:17)(cid:17) − ξ1n =O n 12(1−εn) n −1 =O n −12−12εn =o(1). (7) λr2 λ λ λ (cid:18)(cid:16) (cid:17) (cid:16) (cid:17) (cid:19) (cid:18)(cid:16) (cid:17) (cid:19) Equations (5), (6) and (7) imply that Pn{0,k}(Z<ξ1)=o(1). In order to estimate the upper tail, we note that Lemma 4 implies Pn{0,k}(Z > ξ2) ≤ nkPn{0,k}(Z = ξ ). Therefore, using Lemma 3 we obtain 2 ⌈ ⌉ λξ λξ2 ξ n P 0,k (Z>ξ ) 2 exp 2 1+O 2 +o(1) , (8) n{ } 2 ≤ k − 2n λr2 (cid:18) (cid:18) (cid:18) (cid:19)(cid:19) (cid:19) where arguments analogous to the ones of Equations (6) and (7) show that ξ n 2 =o(1). (9) λr2 and λξ2 n 2 exp 23/4log1/4 . (10) n ∼ λ (cid:16) (cid:16) (cid:17)(cid:17) Let c =log1/4(n/λ). We note that c approaches infinity when so does n. Since logξ 1(1+ε )c4, n n 2 ∼ 2 n n we have from Equations (8), (9) and (10) that Pn{0,k}(Z>ξ2)≤ λk exp 1+2εnc4n(1+o(1))−e23/4cn(1+o(1))+o(1) =o(1). (cid:18) (cid:19) Finally, the calculations above prove that P 0,k (ξ Z ξ )=1 P 0,k (Z<ξ ) P 0,k (Z>ξ )=1+o(1). n{ } 1 ≤ ≤ 2 − n{ } 1 − n{ } 2 ⊔⊓ It is a well known fact that the restrictionof a random unrestricted mapping f to its set of cyclic Z nodes is a uniform random permutation of , but this also holds for 0,k -mappings; see Lemma 1 Z { } of[2]. We state this resultbelow for future reference. We denote the symmetric groupon n elements by S and remark that if f :[n] [n] is a mapping such that Z(f)=m, then exist a unique permutation n σf ∈Sm and an increasing fun→ction ϕf :Z(f)→[m] such that ϕf ◦f ◦ϕ−f1 =σf. Lemma 6. Let n=kr, n,k 2. Let be a subset of [n] with m elements and let σ S . If m n/k, m ≥ A ∈ ≤ then 1 P 0,k f =σ = = . n{ } Z A m! A The following lemma is used in Section(cid:0)s 3(cid:12) and 4(cid:12)in our(cid:1)asymptotic estimates: we obtain upper and (cid:12) (cid:12) lower bounds for the expectation of T and B in the form of item (ii) of the lemma below. Lemma 7. Let L and A be sequences of positive real numbers. Then the following are h ri∞r=1 h ri∞r=1 equivalent: (i) L =A (1+o(1)) as r ; r r →∞ (ii) For any ε>0, there exists R=R(ε) such that the inequalities (1 ε)A <L <(1+ε)A hold r r r − for all r >R. Proof. FirstwenotethatL =A (1+o(1))ifandonlyif Lr 1=o(1), thatis,if lim(Lr 1)=0. By r r Ar − r Ar − definition of a limit, this holds if and only if for any ε>0 there exists R=R(ε) su→ch∞that Lr 1 <ε |Ar − | for all r >R. It canbe easily checkedthat this conditionis equivalentto (1 ε )A <L <(1+ε )A . 1 r r 1 r − ⊔⊓ 6 3 Expected Value of T In this section we obtain asymptotic estimates for En{0,k}(T) and En{0,k}(B) following the same strategy as in [22], that we describe next. We can write the expected value of T over all 0,k -mappings as { } n E 0,k (T)= P 0,k (Z=m)E 0,k (TZ=m). (11) n{ } n{ } n{ } | m=1 X If we let M be the expected order of a uniform random permutation of S , then Equation (11) and m m Lemma 6 imply n En{0,k}(T)= Pn{0,k}(Z=m)Mm. (12) m=1 X The author in [22] combines an exact result for PN(Z = m) with the following lemma to estimate the n expected value of T asymptotically in the case of unrestricted mappings. We use Theorem 1 for the distribution of Z over 0,k -mappings. { } Lemma 8. Let M be the expected order of a random permutation of S . Let β =√8I, where m m 0 ∞ e I = loglog dt. (13) 1 e t Z0 (cid:18) − − (cid:19) Then, as m approaches infinity, m √mloglogm logM =β +O . m 0 logm logm r (cid:18) (cid:19) In particular, if ε ( 1,0), ε (0,1) and β =β +ε, there exists N such that, for all m>N , 1 2 ε 0 ε ε ∈ − ∈ m m β <logM <β . ε1 logm m ε2 logm r r It is clear from Equation (12) that, if m is the integer that maximizes Pn{0,k}(Z = m)Mm for ∗ 1 m n and m is an integer in (1,n), then 0 ≤ ≤ P 0,k (Z=m )M E 0,k (T) nP 0,k (Z=m )M . n{ } 0 m0 ≤ n{ } ≤ n{ } ∗ m∗ Let n 1 and ε ( 1,1). We extend the factorials in the expression for Pn{0,k}(Z=m ) in Theorem 1 ≥ ∈ − ∗ using Gamma functions, as in Equation (3). Also, we bound the quantity M for large m as described m in Lemma 8. For β =β +ε, let ε 0 Γ(r) Γ(n x) x φn,ε(x)=λxkx−1 − exp βε . (14) Γ(r x+1) Γ(n) logx − (cid:18) r (cid:19) The calculation of the maximum value that the real function φ (x) assumes for x (1,n) is a main n,ε ∈ ingredient in the proof of the asymptotic estimate on En{0,k}(T). In order to simplify the calculations that follow, we consider the function Φ (x) = logφ (x) and note that x is a local maximum of n,ε n,ε ∗ φ (x) if and only if it is a local maximum of Φ (x). n,ε n,ε Proposition 1. Let n = kr, λ = k 1 1 and ε ( 1,1). If, for some 0 < α < 1, k = o(n1 α) as − − ≥ ∈ − r approaches infinity, then there exists a constant c > 0 such that, for sufficiently large n, the function x φ (x) assumes a unique maximum x for x (c,r). Moreover, if k = 3 35β4/8, then, as r 7−→ n,ε ∗ ∈ ε ε approaches infinity, p (n/λ)1/3 logφ (x )=k (1+o(1)). n,ε ∗ εlog2/3(n/λ) 7 Proof. Let Φ =logφ . We note that n,ε n,ε 1 d Γ(n x) β logxlogx 1 ε Φ′n,ε(x)= x +logk+ dxlog Γ(r −x+1) + 2 x log2−x , (cid:18) − (cid:19) r and hence, 1 β 1 ε Φ′n,ε(x)=logk+ x +Ψ(r−x+1)−Ψ(n−x)+ 2√xlogx 1− logx , (15) (cid:18) (cid:19) whereΨ(z)denotesthe derivativeoflogΓ(z). InordertoprovetheuniquenessofthemaximumofΦ , n,ε we note that 1 β 3 Φ′n′,ε(x)=−x2 −Ψ′(r−x+1)+Ψ′(n−x)− 4ε(x3logx)−1/2 1− log2x . (16) (cid:18) (cid:19) It follows from Lemma 1 that Ψ(y) is monotone decreasing for y a positive real number, so n r+1 ′ implies−Ψ′(r−x+1)+Ψ′(n−x)≤0. WeconcludeusingEquation(16)thatΦ′n′,ε(x)<0if1−3log≥−2x> 0; this condition holds if x>c, where c=exp(√3). We note that Equation (15) implies that Φ (x)=0 if and only if ′n,ε 1 β 1 ε logk+ +Ψ(r x+1) Ψ(n x)+ 1 =0. x − − − 2√xlogx − logx (cid:18) (cid:19) We proceed heuristically in order to obtain an intuition for the asymptotic behaviour of the point x (1,n) that maximizes Φ (x). By Lemma 2, for x=o(r) we have n,ε ∗ ∈ (k 1)x Ψ(r x+1) Ψ(n x) logk − . (17) − − − ∼− − n Assume that the estimate (17) holds as an equality; since λ = k 1, the equation Φ (x) = 0 is − ′n,ε equivalent to 1 λx β 1 ε + 1 =0, x − n 2√xlogx − logx (cid:18) (cid:19) and multiplying this equation by x we obtain β x 1/2 1 2 logx 1/2 λx2 ε 1 + = . 2 (cid:18)logx(cid:19) − logx βε (cid:18) x (cid:19) ! n This is equivalent to 1/2 β n 1 2 logx (x3logx)1/2 = ε 1 + . 2 λ − logx βε (cid:18) x (cid:19) ! If the function Φ (x) assumes indeed a unique maximum x in (c,r), c=exp(√3), and x approaches n,ε ∗ ∗ infinity when so does n, we expect to have β n (x3logx )1/2 = ε (1+o(1)), ∗ ∗ 2 λ that is, β2 n 2 x3logx = ε (1+o(1)). (18) ∗ ∗ 4 λ (cid:16) (cid:17) We use bootstrapping to obtain an approximation for the solution of Equation (18); see Section 4.1.2 of [14]. If not for the term logx in Equation (18), the solution would present asymptotic behavior ∗ 8 x c (n/λ)2/3 for some real number c > 0, and thus logx 2log(n/λ) as r approaches infinity. ∗ ∼ 1 1 ∗ ∼ 3 Hence, 2 β2 n 2 x3 log(n/λ)= ε (1+o(1)), ∗3 4 λ (cid:16) (cid:17) and using the fact that k =o(n1 α) we obtain − 3β2 (n/λ)2 x3 = ε (1+o(1)), ∗ 8 log(n/λ) that is, 3β2 (n/λ)2/3 x = 3 ε (1+o(1)). (19) ∗ r 8 log1/3(n/λ) We prove now what was obtained heuristically in Equation (19). We define 3β2 (n/λ)2/3 t = 3 ε (20) ∗ r 8 log1/3(n/λ) and consider, for some δ = o(1) to be determined, the interval [a,b] where a = a(n,ε), b = b(n,ε) are n defined by a=t (1 δ ) and b=t (1+δ ). n n ∗ − ∗ We prove using Equation (15) that Φ′n,ε(a)>0 and Φ′n,ε(b)<0. (21) Equation (21) implies x = t 1+O(δ ) , as desired. We prove Equation (21) using Equation (15), n ∗ ∗ where the last term in the expression for Φ (b) is given by (cid:0) (cid:1)′n,ε 1/2 1/2 1/2 βε 1 βε 1 2 n − = log +O loglogn . 2 blogb 2 t (1+δ ) 3 λ (cid:18) (cid:19) (cid:18) ∗ n (cid:19) (cid:18) (cid:16) (cid:17) (cid:0) (cid:1)(cid:19) that is, 1/2 1/2 β 1 β 3/2 loglogn ε = εt−1/2 1+O . 2 (cid:18)blogb(cid:19) 2 ∗ (cid:18)(1+δn)log(n/λ)(cid:19) (cid:18) (cid:18) logn (cid:19)(cid:19) Hence, using Equation (20), β 1 1/2 3λβ2 loglogn ε = 3 ε (1+δ ) 1/2 1+O . (22) n − 2 blogb s8nlog(n/λ) logn (cid:18) (cid:19) (cid:18) (cid:18) (cid:19)(cid:19) Since b=o(r), it follows from Lemma 2 that λt t2 logk+Ψ(r−b+1)−Ψ(n−b)=− n∗(1+δn)+O r∗2 . (23) (cid:18) (cid:19) Equations (15), (22) and (23) together with 1 =O loglogn imply b logn (cid:16) (cid:17) 1 t2 λt 3λβ2 loglogn Φ′n,ε(b)= b +O r∗2 − n∗(1+δn)+s3 8nlog(nε/λ)(1+δn)−1/2 1+O logn ; (cid:18) (cid:19) (cid:18) (cid:18) (cid:19)(cid:19) using (1+δ ) 1/2 =1 1δ +O(δ2), we obtain n − − 2 n n 1 t2 λt 3λβ2 δ loglogn Φ′n,ε(b)= b +O r∗2 − n∗(1+δn)+s3 8nlog(nε/λ) 1− 2n +O(δn2)+O logn . (cid:18) (cid:19) (cid:18) (cid:18) (cid:19)(cid:19) 9