Compositions into Powers of $b$: Asymptotic Enumeration and Parameters

For a fixed integer base $b\geq2$, we consider the number of compositions of $1$ into a given number of powers of $b$ and, related, the maximum number of representations a positive integer can have as an ordered sum of powers of $b$. We study the asymptotic growth of those numbers and give precise asymptotic formulae for them, thereby improving on earlier results of Molteni. Our approach uses generating functions, which we obtain from infinite transfer matrices. With the same techniques the distribution of the largest denominator and the number of distinct parts are investigated.


Introduction
Representations of integers as sums of powers of 2 occur in various contexts, most notably of course in the usual binary representation. Partitions of integers into powers of 2, i.e., representations of the form = 2 a 1 + 2 a 2 + · · · + 2 an (1.1) with nonnegative integers a 1 ≥ a 2 ≥ · · · ≥ a n (not necessarily distinct!) are also known as Mahler partitions (see [2,12,15,19]).
The number of such partitions exhibits interesting periodic fluctuations. The situation changes, however, when compositions into powers of 2 are considered, i.e., when the summands are arranged in an order. In other words, we consider representations of the form (1.1) without further restrictions on the exponents a 1 , a 2 , . . . , a n other than being nonnegative.
Motivated by the study of the exponential sum where ξ is a primitive qth root of unity and τ is the order of 2 modulo q (see [16]), Molteni [17] recently studied the maximum number of representations a positive integer can have as an ordered sum of n powers of 2. More generally, fix an integer b ≥ 2, let U b ( , n) = #{(a 1 , a 2 , . . . , a n ) ∈ N n be the number of representations of as an ordered sum of n powers of b, and let W b (s, n) be the maximum of U b ( , n) over all positive integers with b-ary sum of digits equal to s. It was shown in [16] that W 2 (s, n) n! = k 1 ,k 2 ,...,ks≥1 k 1 +k 2 +···+ks=n s j=1 which generalizes in a straightforward fashion to arbitrary bases b. So knowledge of W b (1, n) is the key to understanding W b (s, n) for arbitrary s.
For the moment, let us consider the case b = 2. There is an equivalent characterisation of W 2 (1, n) in terms of compositions of 1. To this end, note that the number of representations of 2 h as a sum of powers of 2 is the same as the number of representations of for all integers h if negative exponents are allowed as well (simply multiply/divide everything by 2 h ). Therefore, W 2 (1, n) is also the number of solutions to the Diophantine equation 2 −k 1 + 2 −k 2 + · · · + 2 −kn = 1 (1.4) with nonnegative integers k 1 , k 2 , . . . , k n , i.e., the number of compositions of 1 into powers of 2. This sequence starts with 1, 1, 3, 13, 75, 525, 4347, 41245, 441675, 5259885, 68958747, . . . and is A007178 in the On-Line Encyclopedia of Integer Sequences [18].
The main goal of this paper is to determine precise asymptotics for the number of such binary compositions as n → ∞. Lehr, Shallit and Tromp [14] encountered these compositions in their work on automatic sequences and gave a first bound, namely W 2 (1, n)/n! ≤ K · 1.8 n for some constant K. It was mainly based on an asymptotic formula for the number of partitions of 1 into powers of 2, which was derived independently in different contexts, cf. [1,7,13] (or see the recent paper of Elsholtz, Heuberger and Prodinger [5] for a detailed survey). This bound was further improved by Molteni, who gave the inequalities 0.3316 · (1.1305) n ≤ W 2 (1, n)/n! ≤ (1.71186) n−1 · n −1.6 in [16]. Giorgilli and Molteni [9] provided an efficient recursive formula for W 2 (1, n) and used it to prove an intriguing congruence property. In his recent paper [17], Molteni succeeded in proving the following result, thus also disproving a conjecture of Knuth on the asymptotic behaviour of W 2 (1, n).

exists.
Molteni's argument is quite sophisticated and involves the study of the spectral radii of certain matrices. The aim of this paper will be to present a different approach to the asymptotics of W 2 (1, n) (and more generally, W 2 (s, n)) by means of generating functions that allows us to obtain more precise information. Our main theorem reads as follows.
Theorem II. There exist constants α = 0.2963720490 . . . , γ = 1.1926743412 . . . (as in Theorem I) and κ = 2/(3γ) < 1 such that More generally, for every fixed s, there exists a polynomial P s (n) with leading term We also prove a more general result for arbitrary bases instead of 2. Consider the Diophantine (1.5) Multiplying by the common denominator and taking the equation modulo b − 1, we see that there can only be solutions if n ≡ 1 mod b − 1, i.e., n = (b − 1)m + 1 for some nonnegative integer m. We write q b (m) for the number of solutions (n-tuples of nonnegative integers satisfying (1.5)) in this case. Note that q b (m) is also the maximum number of representations of an arbitrary power of b as an ordered sum of n = (b − 1)m + 1 powers of b. We have the following general asymptotic formula.
Theorem III. For every positive integer b ≥ 2, there exist constants α = α b , γ = γ b and κ = κ b < 1 such that the number q b (m) of compositions of 1 into n = (b − 1)m + 1 powers of b, which is also the maximum number W b (1, n) of representations of a power of b as an ordered sum of n powers of b, satisfies More generally, the maximum number W b (s, n) of representations of a positive integer with b-ary sum of digits s as an ordered sum of n = (b − 1)m + s powers of b is asymptotically given by where P b,s (m) is a polynomial with leading term α s m s−1 /(s − 1)!.
The key idea is to equip every partition of 1 into powers of 2 (or generally b) with a weight that essentially gives the number of ways it can be permuted to a composition, and to apply the recursive approach that was used to count partitions of 1: if p 2 (n) denotes the number of such partitions into n summands, then the remarkable generating function identity holds, and this can be generalised to arbitrary bases b, see the recent paper of Elsholtz, Heuberger and Prodinger [5]. In our case, we do not succeed to obtain a similarly explicit formula for the generating function, but we can write it as the quotient of two determinants of infinite matrices and infer analytic information from it. The paper is organised as follows: we first describe the combinatorial argument that yields the generating function, a priori only within the ring of formal power series. We then study the expression obtained for the generating function in more detail to show that it can actually be written as the quotient of two entire functions. The rest of the proof is a straightforward application of residue calculus (using the classical Flajolet-Odlyzko singularity analysis [6]).
Furthermore, we consider the maximum of U b ( , n) over all , for which we write This means that M b (n) is the maximum possible number of representations of a positive integer as a sum of exactly n powers of b. Equivalently, it is the largest coefficient in the power series expansion of When b = 2, Molteni [17] obtained the following bounds for this quantity: The gap between the two estimates is already very small; we improve this a little further by providing the constant of exponential growth as well as a precise asymptotic formula.
Theorem IV. For a certain constant ν = 1.7521819 . . . (defined precisely in Section 7), we have M 2 (n) /n! ≤ ν n for all n ≥ 1, and the constant is optimal: we have the more precise asymptotic formula Again, Theorem IV holds for arbitrary integer bases b ≥ 2 for some constants ν = ν b and λ = λ b (it will be explained precisely how they are obtained). This is formulated as Theorem V in Section 7.
The final section contains the analysis of some parameters. We study the exponent of the largest denominator and the number of distinct parts in a composition of 1. In both cases a central limit theorem is shown; mean and variance are linear in the number of summands, cf. Theorems VI and VII.

The Recursive Approach
For our purposes, it will be most convenient to work in the setting of compositions of 1, i.e., we are interested in the number q b (m) of (ordered) solutions to the Diophantine equation (1.5), where n = (b − 1)m + 1, as explained in the introduction. Our first goal is to derive a recursion for q b (m) and some related quantities, which leads to a system of functional equations for the associated generating functions.
Let k = (k 1 , k 2 , . . . , k n ) be a solution to the Diophantine equation (1.5) with k 1 ≥ k 2 ≥ · · · ≥ k n . We will refer to such an n-tuple as a "partition" (although technically the k i are only the exponents in a partition). We denote by c(k) the number of ways to turn it into a composition. If w 0 is the number of zeros, w 1 the number of ones, etc. in k, then we clearly have The weight of a partition k, denoted by w(k), is now simply defined as

Now let
be the set of all partitions of 1 with n = (b − 1)m + 1 terms and, likewise, the set of compositions. We obtain the formula for their number. Our next step involves an important observation that is also used to obtain the generating function (1.6). Consider an element k of P m , and let r be the number of times the greatest element k 1 occurs (i.e., k 1 = k 2 = · · · = k r > k r+1 ). This number must be divisible by b (as can be seen by multiplying (1.5) by b k 1 ) unless k is the trivial partition, so we can replace them by r/b fractions with denominator b k 1 −1 .
This process can be reversed. Given a partition k in which the largest element occurs r times, we can replace s, 1 ≤ s ≤ r, of these fractions by bs fractions with denominator b k 1 +1 . This recursive construction can be illustrated nicely by a tree structure as in Figure 2.1 for the case b = 2. Each partition corresponds to a so-called canonical tree (see [5]), and vice versa. Note that if k ∈ P m , then the resulting partition k lies in P m+s , and we clearly have (2.1)  Now we can turn to generating functions. Let P m,r be the subset of P m that only contains partitions for which k 1 = k 2 = · · · = k r > k r+1 (i.e., in (1.5), the largest exponent occurs exactly r times), and let C m,r be the set of compositions obtained by permuting the terms of an element of P m,r . We define a generating function by We have Q 1 (x) = 1 and Q r (x) = 0 for all other r not divisible by b. Moreover, for all s ≥ 1 the recursive relation described above and in particular (2.1) yield This can be seen as an infinite system of linear equations. Define the infinite (column-)vector . .) T , and the infinite matrix M(x) by its entries otherwise.
Then the identity (2.2) above turns into the matrix identity where e 1 = (1, 0, 0, . . .) T denotes the first unit vector. Within the ring of formal power series, this readily yields 4) and the generating function For our asymptotic result, we will need the dominant singularity of Q(x), i.e., the zero of det(I − M(x)) that is closest to 0. A priori, it is not even completely obvious that this determinant is well-defined, but the reasoning is similar to a number of comparable problems. As mentioned earlier, the determinant T (x) = det(I − M(x)) exists a priori within the ring of formal power series, as the limit of the principal minor determinants. We can write it as (2.5) where the inner sum is over all permutations σ of {i 1 , i 2 , . . . , i h }. Using Eaves' sufficient condition, cf. [4], we get at least convergence for |x| < 1.
We can even show that the formal power series T given by (2.5) defines an entire function. This is proven in Section 3. The same is true (by the same argument) for where M * is obtained from I − M(x) by replacing the first row by 1. Hence we can write the generating function Q(x) as where S(x) and T (x) are both entire functions. The singularities of Q(x) are thus all poles, and it remains to determine the dominant singularity, i.e., the zero of T (x) = det(I − M(x)) with smallest modulus.

Bounds and Entireness
In this section the two formal power series and of Section 2 (in particular cf. Equations (2.5) and (2.6)) are analyzed. Other (similar) functions arising on the way can be dealt with in a similar fashion. Note that S(x) is the determinant of a matrix, which is obtained by replacing the first row of I − M(x) by 1.
We find bounds for the coefficients t n and s n , which will be needed for numerical calculations with guaranteed error estimates as well. Further, those bounds will tell us that the two functions T (x) and S(x) are entire.
Lemma 3.1. The coefficients t n satisfy the bound and with a decreasing function g(n), which tends to zero as n → ∞. In particular, the formal power series T defines an entire function. The same is true for the formal power series S. More precisely, we have Proof. Recall expression (2.5) for the determinant, namely Write n = i 1 + i 2 + · · · + i h for the exponent of x, and note that which is independent of the permutation σ. We also have Since a! ≥ exp(a(log a − 1)) for all positive integers a and f ( Since i 1 , i 2 , . . . , i h have to be distinct, we also have Now that we have an estimate for each term in (2.5), let us also determine a bound for the number of terms corresponding to each exponent n.
It is well known that the number of partitions q(n) of n into distinct parts is asymptotically equal to exp π n/3 + O(log n) . In Robbins's paper [20] we can find the explicit upper bound 1 For each choice of {i 1 , i 2 , . . . , i h }, there are at most h! permutations σ that contribute, which can be bounded by means of Stirling's formula (using also h ≤ √ 2n again). This gives It follows that the coefficient t n of T is bounded (in absolute values) by which proves the theorem for a suitable choice of g(n). A possible explicit bound (relevant for our numerical calculations, see Section 6) is Since this bound decays superexponentially, the determinant T = det(I − M(x)) is an entire function.
The same argument works for S. There, we split up into the summands where we have i 1 = 1 and all other summands. For the second part (the summands with i 1 > 1), the terms are the same as in the determinant that defines T , so it is bounded by the same expression. Each of the summands with i 1 = 1 equals a summand of det(I − M(x)) multiplied by the factor . Therefore, the sum of these terms can be bounded by (b − 1)! times the bound we obtained for the coefficient of x n+1 in det(I − M(x)). This gives us which completes the proof.
Proof. By Lemma 3.1 we have n log n − cn + n g(n) .

Now we use monotonicity to obtain
The second inequality follows in the same way.

Analyzing the Generating Function
Infinite systems of functional equations appear quite frequently in the analysis of combinatorial problems, see for example the recent work of Drmota, Gittenberger and Morgenbesser [3]. Alas, their very general theorems are not applicable to our situation as the infinite matrix M does not represent an p -operator (one of their main requirements), due to the fact that its entries increase (and tend to ∞) along rows. However, we can adapt some of their ideas to our setting.
The main result of this section is the following lemma.
from which it follows that the radius of convergence of Q(x) is at most (b − 1)!. Since all coefficients are positive, Pringsheim's theorem guarantees that the radius of convergence, which we denote by ρ b , is also a singularity. We already know that Q(x) is meromorphic (being the quotient of two entire functions), hence ρ b is a pole singularity. Let p be the pole order, and with Q br as in Section 2 set which must be nonnegative and real. Moreover, we have which shows that w 1 is even strictly positive. Multiplying the matrix equation (2.3) by (ρ b −x) p and taking the limit, we see that w = (w 1 , w 2 , . . .) T is a right eigenvector of M(ρ b ). Since all entries in M(ρ b ) are nonnegative and those on and above the main diagonal are strictly positive, it follows that w r > 0 for all r, i.e., all functions Q r (x) have the same pole order (as Q(x)). Now we split the identity (2.3). Let m 11 = x/(b − 1)! be the first entry of M(x), c the rest of the first column, r the rest of the first row and M the matrix obtained from M by removing the first row and the first column. Moreover, V is obtained from V by removing the first entry Q b (x). Now we have Once again, the inverse (I − M) −1 exists a priori in the ring of formal power series, but one can show that det(I − M) is in fact an entire function, so the entries of the inverse are all meromorphic (see again the calculations in Section 3). Moreover, (I − M) −1 c cannot have a singularity at ρ b or at any smaller positive real number, because if this was the case, the right hand side of (4.2) would have a higher pole order at that point than the left hand side.
Since it has positive coefficients only (the inverse can be expanded into a geometric series), its entries must be analytic in a circle of radius > ρ b around 0. Now we substitute (4.2) in (4.1) to obtain Note that R(x) = m 11 + r(I − M) −1 c has only positive coefficients, so R(x) = 1 has a unique positive real solution, which must be ρ b (recalling that R(x) is analytic in a circle of radius > ρ b around 0). Of course, R (ρ b ) > 0, so its multiplicity is 1, which means that ρ b is a simple pole. Moreover, by the triangle inequality there are no complex solutions of R(x) = 1 with the same modulus, which means that there are no further singularities of Q b (x) (and thus Q(x)) in a circle of radius ρ b + b around 0 for suitable b > 0.

Getting the Asymptotics
In this section, we prove Theorems II and III, which give us constants α b , γ b and κ b < 1 such that for n = (b − 1)m + 1 holds, where P b,s (m) is a polynomial with leading term α s b m s−1 /(s − 1)!. Numerical values of the α b and γ b can be found in Table 5  For easier reading, we skip the index b again, i.e., we set α = α b , γ = γ b , and so on. The proof is the same for all b, except for the fact that different constants occur.
Proof of Theorem III. By now, we know that the function Q(x) can be written as the quotient of two entire functions, cf. Section 2 and Lemma 3.1. More specifically, we use As Lemma 4.1 shows, Q(x) has exactly one pole ρ (which is a simple pole) inside some disc with radius ρ + , > 0, around 0. Thus we can directly apply singularity analysis [6] in the meromorphic setting (cf. Theorem IV.10 of [8]) to obtain This finishes the proof for s = 1. Note that γ = 1/ρ.
In the general case (arbitrary s), we use the relation

which follows from Equation (1.3) and gives us
Once again, we make use of the fact here that the (exponential) generating function is meromorphic, cf. Section 2. The singular expansion of Q(x) s at x = ρ = 1/γ is given by which has α s /(1 − γx) s as its main term. Once again, singularity analysis [6] yields the desired asymptotic formula with main term as indicated in the statement of the theorem.

Reliable Numerical Calculations
We want to calculate the constants obtained in the previous sections in a reliable way. The current section is devoted to this task. Our main tool will be interval arithmetic, which is performed by the computer algebra system Sage [21].
For the calculations, we need bounds for the tails of our infinite sums. We start with the following two remarks, which improves the bound found in Section 3.
Remark 6.1. The bounds of Lemma 3.1 for the determinant (2.5) can be tightened: for an explicit n, we can calculate g(n) more precisely by using the number of partitions of n into distinct parts (and not a bound for that number) and similarly by using the factorial directly instead of Stirling's formula.
An even better, but less explicit bound for the nth coefficient of det(I − M(x)) is given by Note that we do not know whether this bound is decreasing in n or not. However, for a specific n, one can calculate this bound, and it is much smaller than the general bounds above. For example, for b = 2, we have |t 60 | ≤ 5.96 · 10 −14 with this method, whereas Lemma 3.1 would give the bound 0.00014. To get numerical values for the constants, we have to work with where the first few terms of these power series are given by x 5 + · · · , cf. Sections 2 and 5. We obtain the following result for the denominator T (x). On the other hand, we have |T 60 (x)| > 0.062 for |x| = 3 2 (the minimum is attained on the positive real axis) by using a bisection method together with interval arithmetic (in Sage [21]). Therefore, the functions T (x) and T 60 (x) have the same number of zeros inside a disk |x| < 3 2 by Rouché's theorem (0.062 > B T 60 ). This number equals one, since there is only one zero, a simple zero, of T 60 (x) with absolute value smaller than 3 2 . To find the exact position of that zero consider T 60 (x) + B T 60 I with the interval I = [−1, 1]. Again, using a bisection method (starting with 3 2 I) plus interval arithmetic, we find an interval that contains x 0 . From this, we can extract correct digits of x 0 .
From the previous result, we can calculate all the constants. The values of those for the first few b can be found in Table 5.1. The following remark gives some details. Remark 6.5. As mentioned, to obtain reliable numerical values of all the constants involved in the statement of our theorems, we use the bounds obtained in Section 3 together with interval arithmetic.
Let b = 2 and denote, as above, the polynomials consisting of the first N terms of S(x) and T (x), by S N (x) and T N (x) respectively. By the methods of Lemmas 3.1 and 3.2 and Remarks 6.1 and 6.2 we get, for instance, that |T (x) − T 60 (x)| ≤ B T 60 with B T 60 = 8.397·10 −12 . We also have |S(x) − S 60 (x)| ≤ B S 60 with B S 60 = 1.848·10 −13 for the function in the numerator of Q(x). We plug x 0 into the approximations S 60 and T 60 and use these bounds to obtain precise values (with guaranteed error estimates) for all the constants that occur in our formula.
We finish this section with the following remark.
Remark 6.6. If one does not insist on such explicit error bounds for the numerical approximations as above, one can get "more precise" numerical results (without formal proofs that all the digits are actually correct). Here, specifically, the first three terms in the asymptotic expansion are as follows: However, the numerical approximations lack the "certifiability" of e.g. those in Table 5.1.

Maximum Number of Representations
Let U b ( , n) and W b (s, n) be as defined in (1.2) in the introduction. In this section we analyze the function M (n) = M b (n), which equals the maximum of U b ( , n) over all , i.e., we have This gives the maximum number of representations any positive integer can have as the sum of exactly n powers of b.
Throughout this section, we use the generating function Further, denote by θ the unique positive real solution (the power series W has real, nonnegative coefficients) with W (θ) = 1, and we set ν = 1/θ. We prove the following theorem, which is a generalized version of Theorem IV.
Theorem V. With the notions of W (x), θ and ν as above, we have M (n) /n! ≤ ν n (7.1) for all n ≥ 1, and the constant is optimal: We have the more precise asymptotic formula .  In the calculations the approximation W 60 (x) was used.
In Table 7.1, we are listing numerical values for the constants of Theorem V. These values are simply calculated by using a finite approximation to W (x), namely n!
x n for some precision N .
We start with the upper bound (7.1) of Theorem V, which is done in the following lemma.

Proof. Recall that Equation (1.3) gives us
Since θ > 0 was chosen such that W (θ) = 1, it clearly follows that ∞ n=1 W b (s, n) n! θ n = 1, hence W b (s, n) /n! ≤ θ −n for all s and n, and taking the maximum over all s ≥ 1 yields which is what we wanted to show.
It remains to prove the asymptotic formula for M (n). We first gather some properties of the solution x = θ(u) of the functional equation W (x) = 1/u. Proof. Let u be as stated in the lemma. By the nonnegativity of the coefficients of W and the triangle inequality, we have 2) The first part of the lemma follows, since W is increasing on the positive real line. It remains to determine when equality holds, so we assume in the following that |x| = θ.
Since the coefficients W b (1, n) are nonzero only for n ≡ 1 mod b − 1, we can write W (x) = x V x b−1 . From (7.2), we obtain Since the coefficients of V are indeed positive, the power series V is aperiodic 2 . Therefore, the inequality V x b−1 ≤ V x b−1 is strict, i.e., we have V x b−1 < V x b−1 (which would yield a contradiction to the assumption that |x| = θ) unless x b−1 is real and positive, which means that x b−1 = θ b−1 . When this is the case, we have This means that x b−1 can only be real and positive if x is itself real and positive, which implies that x = θ and u = 1.
The following lemma tells us that the single dominant root of W (x) = 1 is the simple zero θ. Lemma 7.3. There exists exactly one root of W (x) = 1 with |x| ≤ θ, namely θ. Further, θ is a simple root, and there exists an > 0 such that θ is the only root of W (x) = 1 with absolute value less than θ + .
Proof. By Lemma 7.2 with u = 1, the positive real θ is the unique root of W (x) = 1 with minimal absolute value. This proves the first part of the lemma.
Using Theorem III, we get which is bounded for |x| < 1/γ 1/(b−1) . Therefore, the radius of convergence r of W is at least 1/γ 1/(b−1) > θ, and so W is holomorphic inside a circle that contains θ. Since zeros of holomorphic functions do not accumulate, the existence of a suitable > 0 as desired follows. The root θ is simple, since W (x) is strictly increasing on (0, r).
We are now ready to prove the asymptotic formula for M (n). To this end, we consider the bivariate generating function .
In order to get max s≥1 W b (s, n), we show that the coefficients varying with s fulfil a local limit law (as n tends to ∞). The maximum is then attained close to the mean.
Proof of Theorem V. Set We extract g n from the bivariate generating function G(x, u). In order to do so, we proceed as in Theorem IX.9 (singularity perturbation for meromorphic functions) of Flajolet and 2 A power series is aperiodic if the exponents whose associated coefficients are not zero are not contained in a + bZ for any a, b with b ≥ 2.
Sedgewick [8]. An important detail here is the fact that W b (s,n) n! [u s x n ] G(x, u) can only be nonzero if s ≡ n mod (b − 1), hence g n can also be expressed as where r ∈ {0, 1, . . . , b − 2} is chosen in such a way that r ≡ n mod (b − 1). This is also the reason why it was enough in Lemma 7.2 to consider the case | Arg u| ≤ π b−1 . Now we check that all requirements for applying the quasi-power theorem are fulfilled. By Lemma 7.3, the function G(x, 1) has a dominant simple pole at x = θ and no other singularities with absolute values smaller than θ + . The denominator 1 − u W (x) is analytic and not degenerated at (x, u) = (θ, 1); the latter since its derivative with respect to x is W (θ) = 0 (θ is a simple root of F ) and its derivative with respect to u is − W (θ) = −1 = 0.
Thus the function θ(u) which gives the solution to the equation W (θ(u)) = θ with smallest modulus has the following properties: it is analytic at u = 1, it fulfils θ(1) = θ, and for some > 0 and u in a suitable neighbourhood of 1, there is no x = θ(u) with W (x) = 1/u and |x| ≤ θ + .
Therefore, by Cauchy's integral formula and the residue theorem, we obtain To get the results claimed in Theorem V, we use a local version of the quasi-power theorem, see Theorem IX.14 of [8] or Hwang's original paper [10]. Set In terms of h n , this becomes Here, v 1/(b−1) is taken to be the principal (b−1)th root of v, which satisfies Arg v 1/(b−1) ≤ π b−1 . Since θ(u) = 0 for u in a suitable neighbourhood of 0, the function B is analytic at zero, and so is the function A (since W is analytic in a neighbourhood of θ(1) = θ as well and has a nonzero derivative there). Moreover, we can use the fact that θ e iϕ has a unique minimum at ϕ = 0 if we assume that |ϕ| ≤ π b−1 (which follows from Lemma 7.2). As a result, Theorem IX.14 of [8] (slightly adapted to account for the periodicity of g n ) gives us where z = (s − µn)/ √ n. Mean and variance can be calculated as follows. We have and σ > 0 is determined by where we used implicit differentiation of W (θ(u)) = 1/u to get expressions for θ (u) and θ (u).
The value W b (s, n) /n! is maximal with respect to s when s = µn + O(1). Its asymptotic value can then be calculated by (7.3).

The Largest Denominator and the Number of Distinct Parts
In this last section we analyze some parameters of our compositions of 1. In particular, we will see that the exponent of the largest denominator occurring in a random composition into a given number of powers of b and the number of distinct summands are both asymptotically normally distributed and that their means and variances are of linear order.
Let us start with the largest denominator, for which we obtain the following theorem. Note that we suppress the dependence on b in all constants again.
Theorem VI. The exponent of the largest denominator in a random composition of 1 into m = (b − 1)n + 1 powers of b is asymptotically normally distributed with mean µ n + O(1) and variance σ 2 n + O(1).
Numerical approximations to the values of µ and σ 2 can be found in Table 8.1. The proof runs along the same lines as the proofs of Theorems III and V, so we only give a sketch here.
Sketch of proof of Theorem VI. We start by considering a bivariate generating function for the investigated parameter. In the recursive step described in Section 2 that led us to the identity (2.2), the exponent of the largest denominator increases by 1. Thus it is very easy to incorporate this parameter into the generating function. Indeed, if (k) denotes the exponent of the largest denominator that occurs in a composition (or partition) k, then the bivariate generating function L r (x, y) = It follows by the same estimates as in Section 3 that this is a meromorphic function in x for y in a suitable neighbourhood of 1. Thus our bivariate generating function belongs to the meromorphic scheme as described in Section IX.6 of [8], and the asymptotics of mean and variance are obtained by standard tools of singularity analysis. Asymptotic normality follows by Hwang's quasi-power theorem [11].
For the number of distinct parts we prove the following result.
Theorem VII. The number of distinct parts in a random composition of 1 into m = (b−1)n+1 parts is asymptotically normally distributed with mean µ d n + O(1) and variance σ 2 d n + O(1). Approximations of the constants can be found in Table 8.1. Again we only sketch the proof, since it uses the same ideas.
Sketch of proof of Theorem VII. Again, we consider a bivariate generating function. In the recursive step, the number of distinct parts increases by 1, unless all fractions with highest denominator are split. In this case, the number of distinct parts stays the same. One can easily translate this to the world of generating functions: let d(k) be the number of distinct parts in k, and let D r (x, y) be the bivariate generating function, where y now marks the number of distinct parts, i.e., we use D r (x, y) = n≥0 k∈Cn,r 1 ((b − 1)n + 1)!
x n y d(k) = n≥0 k∈Pn,r w(k) x n y d(k) .
Then we have D 1 (x, y) = y and D bs (x, y) = s! x s (bs)! D s (x, y) + x s y r>s r! (r − s)! (bs)! D r (x, y) .
Once again, we take the infinite vector V(x, y) = (D b (x, y) , D 2b (x, y) , D 3b (x, y) , . . .) T , and we define a modified version M * of the infinite matrix by its entries Once again, we find that the bivariate function belongs to the meromorphic scheme, so that we can apply singularity analysis and the quasi-power theorem to obtain the desired result.