1 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

$$\begin{aligned} \ell = 2^{a_1} + 2^{a_2} + \cdots + 2^{a_n} \end{aligned}$$
(1.1)

with nonnegative integers \(a_1 \ge a_2 \ge \cdots \ge a_n\) (not necessarily distinct!) are also known as Mahler partitions (see [2, 12, 16, 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

$$\begin{aligned} s(\xi ) = \sum _{r=1}^{\tau } \xi ^{2^r}, \end{aligned}$$

where \(\xi \) is a primitive qth root of unity and \(\tau \) is the order of 2 modulo q (see [17]), Molteni [18] 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\ge 2\), let

$$\begin{aligned} {{{\mathcal {U}}_b}({\ell ,n})} = \#\{(a_1,a_2,\ldots ,a_n) \in \mathbbm {N}_0^n\, \vert \, b^{a_1} + b^{a_2} + \dots + b^{a_n} = \ell \} \end{aligned}$$
(1.2)

be the number of representations of \(\ell \) as an ordered sum of n powers of b, and let \({{\mathcal {W}_b}({s,n})}\) be the maximum of \({{{\mathcal {U}}_b}({\ell ,n})}\) over all positive integers \(\ell \) with b-ary sum of digits equal to s. It was shown in [17] that

$$\begin{aligned} \frac{{{\mathcal {W}_2}({s,n})}}{n!} = \sum _{\begin{array}{c} k_1,k_2,\ldots ,k_s \ge 1 \\ k_1+k_2+\cdots +k_s = n \end{array}} \prod _{j=1}^s \frac{\mathcal {W}_2(1,k_j)}{k_j!}, \end{aligned}$$
(1.3)

which generalizes in a straightforward fashion to arbitrary bases b. So knowledge of \({{\mathcal {W}_b}({1,n})}\) is the key to understanding \({{\mathcal {W}_b}({s,n})}\) for arbitrary s.

For the moment, let us consider the case \(b=2\). There is an equivalent characterisation of \({{\mathcal {W}_2}({1,n})}\) in terms of compositions of 1. To this end, note that the number of representations of \(2^h\ell \) as a sum of n powers of 2 (n fixed) is the same as the number of representations of \(\ell \) as a sum of n powers of 2 for all integers h if negative exponents are allowed as well (simply multiply/divide everything by \(2^h\)). Therefore, \({{\mathcal {W}_2}({1,n})}\) is also the number of solutions to the Diophantine equation

$$\begin{aligned} 2^{-k_1} + 2^{-k_2} + \cdots + 2^{-k_n} = 1 \end{aligned}$$
(1.4)

with nonnegative integers \(k_1,k_2,\ldots ,k_n\), i.e., the number of compositions of 1 into n powers of 2. This sequence starts with

$$\begin{aligned} 1, 1, 3, 13, 75, 525, 4347, 41245, 441675, 5259885, 68958747, \dots \end{aligned}$$

and is A007178 in the On-Line Encyclopedia of Integer Sequences [22].

The main goal of this paper is to determine precise asymptotics for the number of such binary compositions as \(n \rightarrow \infty \). Lehr et al.  [15] encountered these compositions in their work on automatic sequences and gave a first bound, namely

$$\begin{aligned} \mathcal {W}_2(1,n)/n! \le K \cdot 1.8^n \end{aligned}$$

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 et al. [5] for a detailed survey). This bound was further improved by Molteni, who gave the inequalities

$$\begin{aligned} 0.3316 \cdot (1.1305)^n \le \mathcal {W}_2(1, n)/n! \le (1.71186)^{n-1} \cdot n^{-1.6} \end{aligned}$$

in [17]. Giorgilli and Molteni [9] provided an efficient recursive formula for \(\mathcal {W}_2(1,n)\) and used it to prove an intriguing congruence property. In his recent paper [18], Molteni succeeded in proving the following result, thus also disproving a conjecture of Knuth on the asymptotic behaviour of \(\mathcal {W}_2(1,n)\).

Theorem 1

(Molteni [18]). The limit

$$\begin{aligned} \gamma = \lim _{n \rightarrow \infty } (\mathcal {W}_2(1,n)/n!)^{1/n} = 1.192674341213466032221288982528755\ldots \end{aligned}$$

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 \(\mathcal {W}_2(1,n)\) (and more generally, \({{\mathcal {W}_2}({s,n})}\)) by means of generating functions that allows us to obtain more precise information. Our main theorem reads as follows.

Theorem 2

There exist constants \(\alpha = 0.2963720490\dots ,\,\gamma = 1.1926743412\dots \) (as in Theorem 1) and \(\kappa = 2/(3\gamma ) < 1\) such that

$$\begin{aligned} \frac{\mathcal {W}_2(1,n)}{n!} = \alpha \gamma ^{n-1} \left( 1 + {{O}({\kappa ^n})}\right) . \end{aligned}$$

More generally, for every fixed s, there exists a polynomial \({{P_s}({n})}\) with leading term

$$\begin{aligned} (\alpha /\gamma )^s n^{s-1}/(s-1)! \end{aligned}$$

such that

$$\begin{aligned} \frac{{{\mathcal {W}_2}({s,n})}}{n!} = {{P_s}({n})} \gamma ^{n} \left( 1 + {{O}({\kappa ^n})}\right) . \end{aligned}$$

We also prove a more general result for arbitrary bases instead of 2. Consider the Diophantine equation

$$\begin{aligned} b^{-k_1} + b^{-k_2} + \cdots + b^{-k_n} = 1. \end{aligned}$$
(1.5)

Multiplying by the common denominator and taking the equation modulo \(b-1\), we see that there can only be solutions if \(n \equiv 1 \hbox { 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. Note that we will usually suppress the dependence on b for ease of notation.

Theorem 3

For every positive integer \(b \ge 2\), there exist constants \(\alpha = \alpha _b,\,\gamma = \gamma _b\) and \(\kappa = \kappa _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 \({{\mathcal {W}_b}({1,n})}\) of representations of a power of b as an ordered sum of n powers of b, satisfies

$$\begin{aligned} \frac{{{\mathcal {W}_b}({1,n})}}{n!} = \frac{q_b(m)}{n!} = \alpha \gamma ^m \left( 1 + {{O}({\kappa ^m})}\right) . \end{aligned}$$

More generally, the maximum number \({{\mathcal {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

$$\begin{aligned} \frac{{{\mathcal {W}_b}({s,n})}}{n!} = {{P_{b,s}}({m})} \gamma ^m \left( 1 + {{O}({\kappa ^m})}\right) , \end{aligned}$$

where \({{P_{b,s}}({m})}\) is a polynomial with leading term \(\alpha ^s m^{s-1}/(s-1)!\).

The key idea to prove Theorem 3 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

$$\begin{aligned} \sum _{n=1}^{\infty } p_2(n)x^n = \frac{\sum _{j=0}^{\infty } (-1)^j x^{2^j-1} \prod _{i=1}^j \frac{x^{2^i-1}}{1-x^{2^i-1}}}{\sum _{j=0}^{\infty } (-1)^j \prod _{i=1}^j \frac{x^{2^i-1}}{1-x^{2^i-1}}} \end{aligned}$$
(1.6)

holds, and this can be generalised to arbitrary bases b, see the recent paper of Elsholtz et al. [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 \({{{\mathcal {U}}_b}({\ell ,n})}\) over all \(\ell \), for which we write

$$\begin{aligned} {{M_b}({n})}= \max _{\ell \ge 1}\, {{{\mathcal {U}}_b}({\ell ,n})} = \max _{s \ge 1}\, {{\mathcal {W}_b}({s,n})}. \end{aligned}$$

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

$$\begin{aligned} \big ( x + x^b + x^{b^2} + \cdots \big )^n. \end{aligned}$$

When \(b=2\), Molteni [18] obtained the following bounds for this quantity:

$$\begin{aligned} (1.75218)^n \ll {{M_2}({n})}/n! \le (1.75772)^n, \end{aligned}$$

where \(\ll \) is the Vinogradov symbol, i.e., \(C (1.75218)^n \le {{M_2}({n})}/n!\) holds for all (sufficiently large) n for a suitably chosen constant C. 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 4

For a certain constant \(\nu = 1.7521819\ldots \) (defined precisely in Sect. 7), we have

$$\begin{aligned} {{M_2}({n})}/n! \le \nu ^n \end{aligned}$$

for all \(n \ge 1\), and the constant is optimal: we have the more precise asymptotic formula

$$\begin{aligned} {{M_2}({n})}/n! \sim \lambda n^{-1/2} \nu ^n \end{aligned}$$

with \(\lambda = 0.2769343{\ldots }\).

Again, Theorem 4 holds for arbitrary integer bases \(b\ge 2\) for some constants \(\nu =\nu _b\) and \(\lambda =\lambda _b\) (it will be explained precisely how they are obtained). This is formulated as Theorem 5 in Sect. 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 6 and 7.

2 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 \(\mathbf {k} = (k_1,k_2,\ldots ,k_n)\) be a solution to the Diophantine equation (1.5) with \(k_1 \ge k_2 \ge \cdots \ge 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 \(\mathsf {c}(\mathbf {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 \(\mathbf {k}\), then we clearly have

$$\begin{aligned} \mathsf {c}(\mathbf {k}) = \frac{n!}{\prod _{j \ge 0} w_j!}. \end{aligned}$$

The weight of a partition \(\mathbf {k}\), denoted by \(\mathsf {w}(\mathbf {k})\), is now simply defined as

$$\begin{aligned} \mathsf {w}(\mathbf {k}) = \frac{1}{\prod _{j \ge 0} w_j!} = \frac{\mathsf {c}(\mathbf {k})}{n!}. \end{aligned}$$

Now let

$$\begin{aligned} \mathcal {P}_m= & {} \Big \{ \mathbf {k} = (k_1,k_2,\dots ,k_n) \,\Big \vert \, n = (b-1)m+1, \\&\quad b^{-k_1}+b^{-k_2} + \dots + b^{-k_n} = 1, k_1 \ge k_2 \ge \dots \ge k_n \Big \} \end{aligned}$$

be the set of all partitions of 1 with \(n = (b-1)m+1\) terms and, likewise,

$$\begin{aligned} \mathcal {C}_m = \Big \{ \mathbf {k} = (k_1,k_2,\dots ,k_n) \,\Big \vert \, n = (b-1)m+1,\,b^{-k_1}+b^{-k_2} + \dots + b^{-k_n} = 1 \Big \} \end{aligned}$$

the set of compositions. We obtain the formula

$$\begin{aligned} q_b(m) = \#{\mathcal {C}_{m}} = \sum _{\mathbf {k} \in \mathcal {P}_m} \mathsf {c}(\mathbf {k}) = n!\, \sum _{\mathbf {k} \in \mathcal {P}_m} \mathsf {w}(\mathbf {k}) \end{aligned}$$

for their number.

Our next step involves an important observation that is also used to obtain the generating function (1.6). Consider an element \(\mathbf {k}\) of \(\mathcal {P}_m\), and let r be the number of times the greatest element \(k_1\) occurs (i.e., \(k_1 = k_2 = \cdots = 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 \(\mathbf {k}\) is the trivial partition, so we can replace the r fractions with denominator \(b^{k_1}\) by r / b fractions with denominator \(b^{k_1-1}\).

This process can be reversed. Given a partition \(\mathbf {k}\) in which the largest element occurs r times, we can replace s of these fractions (\(1 \le s \le r\)) by bs fractions with denominator \(b^{k_1+1}\). This recursive construction can be illustrated nicely by a tree structure as in Fig. 1 for the case \(b=2\). Each partition corresponds to a so-called canonical tree (see [5]), and vice versa. Note that if \(\mathbf {k} \in \mathcal {P}_m\), then the resulting partition \(\mathbf {k'}\) lies in \(\mathcal {P}_{m+s}\), and we clearly have

$$\begin{aligned} \mathsf {w}(\mathbf {k'}) = \mathsf {w}(\mathbf {k}) \cdot \frac{r!}{(r-s)!\,(bs)!}. \end{aligned}$$
(2.1)
Fig. 1
figure 1

The canonical tree associated with the partition \(1 = \frac{1}{4} + \frac{1}{4} + \frac{1}{4} + \frac{1}{8} + \frac{1}{8}\) of 1 into powers of 2. This partition has weight \(\frac{1}{12}\) and corresponds to ten distinct compositions

Now we can turn to generating functions. Let \(\mathcal {P}_{m,r}\) be the subset of \(\mathcal {P}_m\) that only contains partitions for which \(k_1 = k_2 = \cdots = k_r > k_{r+1}\) (i.e., in (1.5), the largest exponent occurs exactly r times), and let \(\mathcal {C}_{m,r}\) be the set of compositions obtained by permuting the terms of an element of \(\mathcal {P}_{m,r}\). We define a generating function by

$$\begin{aligned} {{Q_r}({x})}= & {} \sum _{m \ge 0} \frac{\#{\mathcal {C}_{m,r}}}{((b-1)m+1)!} x^m = \sum _{m \ge 0} \sum _{\mathbf {k} \in \mathcal {P}_{m,r}} \frac{\mathsf {c}(\mathbf {k})}{((b-1)m+1)!} x^m\\= & {} \sum _{m \ge 0} \sum _{\mathbf {k} \in \mathcal {P}_{m,r}} \mathsf {w}(\mathbf {k}) x^m. \end{aligned}$$

We have \({{Q_1}({x})} = 1\) and \({{Q_r}({x})} = 0\) for all other r not divisible by b. Moreover, for all \(s \ge 1\) the recursive relation described above and in particular (2.1) yield

$$\begin{aligned} {{Q_{bs}}({x})}= & {} \sum _{m \ge 0} \sum _{\mathbf {k'} \in \mathcal {P}_{m,bs}} \mathsf {w}(\mathbf {k'}) x^m = \sum _{r \ge s} \sum _{m \ge s} \sum _{\mathbf {k} \in \mathcal {P}_{m-s,r}} \mathsf {w}(\mathbf {k}) \frac{r!}{(r-s)!\,(bs)!}x^m \nonumber \\= & {} x^s \sum _{r \ge s} \frac{r!}{(r-s)!\,(bs)!} \sum _{m \ge s} \sum _{\mathbf {k} \in \mathcal {P}_{m-s,r}} \mathsf {w}(\mathbf {k})x^{m-s} = x^s \sum _{r \ge s} \frac{r!}{(r-s)!\,(bs)!} {{Q_r}({x})}.\nonumber \\ \end{aligned}$$
(2.2)

This can be seen as an infinite system of linear equations. Define the infinite (column-)vector \(\mathbf {V}(x) = ({{Q_b}({x})},{{Q_{2b}}({x})},{{Q_{3b}}({x})},\ldots )^T\), and the infinite matrix \(\mathbf {M}(x)\) by its entries

$$\begin{aligned} m_{ij} = {\left\{ \begin{array}{ll} \frac{(bj)!\,x^i}{(bj-i)!\,(bi)!} &{}\quad \text {if } i \le bj, \\ 0 &{}\quad \text {otherwise.} \end{array}\right. } \end{aligned}$$

Then the identity (2.2) above turns into the matrix identity

$$\begin{aligned} \mathbf {V}(x) = \mathbf {M}(x) \mathbf {V}(x) + \frac{x}{b!} \mathbf {e}_1, \end{aligned}$$
(2.3)

where \(\mathbf {e}_1 = (1,0,0,\ldots )^T\) denotes the first unit vector. The last term comes from the special case \(s=1\) in (2.2), which is the only case where \(Q_1(x) = 1\) occurs. Within the ring of formal power series, this readily yields

$$\begin{aligned} \mathbf {V}(x) = \frac{x}{b!} (\mathbf {I}-\mathbf {M}(x))^{-1} \mathbf {e}_1, \end{aligned}$$
(2.4)

and the generating function

$$\begin{aligned} {{Q}({x})} = \sum _{r \ge 1} {{Q_r}({x})} = \sum _{m \ge 0} \frac{q_b(m)}{((b-1)m+1)!} x^m \end{aligned}$$

(recall that \(q_b(m)\) is the number of compositions of 1 into \(n = (b-1)m+1\) powers of b) is given by

$$\begin{aligned} {{Q}({x})} = 1 + \mathbf {1}^T \mathbf {V}(x) = 1 + \frac{x}{b!} \mathbf {1}^T (\mathbf {I}-\mathbf {M}(x))^{-1} \mathbf {e}_1, \end{aligned}$$

where \(\mathbf {1}\) stands for the vector \((1,1,1,\ldots )^T\). For our asymptotic result, we will need the dominant singularity of \({{Q}({x})}\), i.e., the zero of \(\det (\mathbf {I}-\mathbf {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 (\mathbf {I}-\mathbf {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

$$\begin{aligned}&\det (\mathbf {I}-\mathbf {M}(x))\nonumber \\&\quad = \sum _{h\ge 0} (-1)^h \sum _{\begin{array}{c} 1\le i_1<i_2<\dots <i_h \\ i_1,\dots ,i_h\in \mathbbm {N} \end{array}} x^{i_1+i_2+\cdots +i_h} \sum _{\sigma } ({\text {sgn}}\,\sigma ) \prod _{k=1}^h \frac{(b{{\sigma }({i_k})})!}{(b{{\sigma }({i_k})}-i_k)!\,(bi_k)!},\nonumber \\ \end{aligned}$$
(2.5)

where the inner sum is over all permutations \(\sigma \) of \(\{i_1,i_2,\ldots ,i_h\}\). Using Eaves’ sufficient condition, cf. [4], we get at least convergence for \( \left| {x}\right|<1\).

We can even show that the formal power series T given by (2.5) defines an entire function. This is proven in Sect. 3. The same is true (by the same argument) for

$$\begin{aligned} {{S}({x})} = \mathbf {1}^T {\text {adj}}(\mathbf {I}-\mathbf {M}(x)) \mathbf {e}_1 = \det (\mathbf {M}^*(x)), \end{aligned}$$

where \(\mathbf {M}^*\) is obtained from \(\mathbf {I}-\mathbf {M}(x)\) by replacing the first row by \(\mathbf {1}\). Hence we can write the generating function \({{Q}({x})}\) as

$$\begin{aligned} {{Q}({x})} = 1 + \frac{x}{b!} \frac{{{S}({x})}}{{{T}({x})}}, \end{aligned}$$
(2.6)

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 (\mathbf {I}-\mathbf {M}(x)) \) with smallest modulus.

3 Bounds and Entireness

In this section the two formal power series

$$\begin{aligned} {{T}({x})} = \sum _{n\ge 0} t_n x^n = \det (I-\mathbf {M}(x)) \end{aligned}$$

and

$$\begin{aligned} {{S}({x})} = \sum _{n\ge 0} s_n x^n = \mathbf {1}^T {\text {adj}}(I-\mathbf {M}(x)) \mathbf {e}_1 \end{aligned}$$

of Sect. 2 [in particular cf. Eqs. (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-\mathbf {M}(x)\) by \(\mathbf {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

$$\begin{aligned} \left| {t_n}\right| \le \exp \left( -\frac{b-1}{2}n\log n - cn + n{{g}({n})} \right) \end{aligned}$$

with \(c = (b-1)\left( \log \frac{b-1}{\sqrt{2}}-1\right) \) and with a decreasing function \({{g}({n})}\), which tends to zero as \(n\rightarrow \infty \). 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

$$\begin{aligned} \left| {s_n}\right| \le \left( (b-1)!+1\right) \exp \left( -\frac{b-1}{2}n\log n - cn + (n+1) {{g}({n})}\right) . \end{aligned}$$

Proof

Recall expression (2.5) for the determinant, namely

$$\begin{aligned}&\det (\mathbf {I}-\mathbf {M}(x))\\&\quad = \sum _{h\ge 0} (-1)^h \sum _{\begin{array}{c} 1\le i_1<i_2<\dots <i_h \\ i_1,\dots ,i_h\in \mathbbm {N} \end{array}} x^{i_1+i_2+\cdots +i_h} \sum _{\sigma } ({\text {sgn}}\,\sigma ) \prod _{k=1}^h \frac{(b{{\sigma }({i_k})})!}{(b{{\sigma }({i_k})}-i_k)!\,(bi_k)!}. \end{aligned}$$

Write \(n = i_1 + i_2 + \cdots + i_h\) for the exponent of x, and note that

$$\begin{aligned} \prod _{k=1}^h \frac{(b{{\sigma }({i_k})})!}{(bi_k)!} = 1, \end{aligned}$$

which is independent of the permutation \(\sigma \). We also have

$$\begin{aligned} \sum _{k = 1}^h (b{{\sigma }({i_k})}-i_k) = (b-1)\sum _{k = 1}^h i_k = (b-1)n. \end{aligned}$$

Since \(a! \ge \exp (a(\log a - 1))\) for all positive integers a and \(f(x) = x(\log x - 1)\) is a convex function, we have

$$\begin{aligned} \prod _{k = 1}^h (b{{\sigma }({i_k})}-i_k)!&\ge \exp \left( \sum _{k=1}^h (b{{\sigma }({i_k})}-i_k) \left( \log (b{{\sigma }({i_k})}-i_k) - 1 \right) \right) \\&\ge \exp \left( h \frac{(b-1)n}{h} \left( \log \frac{(b-1)n}{h} - 1 \right) \right) \\&= \exp \left( (b-1)n \left( \log \frac{(b-1)n}{h} - 1 \right) \right) . \end{aligned}$$

Since \(i_1,i_2,\ldots ,i_h\) have to be distinct, we also have

$$\begin{aligned} n = i_1 + i_2 + \cdots + i_h \ge 1 + 2 + \cdots + h = \frac{h(h+1)}{2} \ge \frac{h^2}{2}. \end{aligned}$$

Thus \(h \le \sqrt{2n}\), which means that

$$\begin{aligned} \prod _{k = 1}^h (b{{\sigma }({i_k})}-i_k)! \ge \exp \left( \frac{b-1}{2}n\log n + (b-1)n \left( \log \frac{b-1}{\sqrt{2}} - 1\right) \right) . \end{aligned}$$

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 \big ( \pi \sqrt{n/3} + {{O}({\log n})} \big )\). In Robbins’s paper [20] we can find the explicit upper boundFootnote 1

$$\begin{aligned} q(n) \le \frac{\pi }{\sqrt{12n}} \exp \left( \frac{\pi }{\sqrt{3}}\sqrt{n} + \frac{\pi ^2}{12}\right) . \end{aligned}$$

For each choice of \(\{i_1,i_2,\ldots ,i_h\}\), there are at most h! permutations \(\sigma \) that contribute, which can be bounded by means of Stirling’s formula (using also \(h \le \sqrt{2n}\) again). This gives

$$\begin{aligned} h! \le \exp \left( h \log h - h + \tfrac{1}{2} \log h + 1 \right) \le \exp \left( \left( \sqrt{2n} + \tfrac{1}{2}\right) \log \left( \sqrt{2n}\right) - \sqrt{2n}+1\right) . \end{aligned}$$

It follows that the coefficient \(t_n\) of T is bounded (in absolute values) by

$$\begin{aligned}&\frac{\exp \left( \frac{\pi }{\sqrt{3}}\sqrt{n} + \frac{\pi ^2}{12} + \log \pi - \frac{1}{2} \log (12n) + \left( \sqrt{2n} + \tfrac{1}{2}\right) \log \left( \sqrt{2n}\right) - \sqrt{2n}+1 \right) }{\exp \left( \frac{b-1}{2}n\log n + (b-1)n \left( \log \frac{b-1}{\sqrt{2}} - 1\right) \right) } \\&\quad =\exp \left( -\frac{b-1}{2}n\log n - cn + {{O}({\sqrt{n} \log n})} \right) , \end{aligned}$$

which proves the theorem for a suitable choice of g(n). A possible explicit bound (relevant for our numerical calculations, see Sect. 6) is

$$\begin{aligned} \left| {t_n}\right| \le \exp \left( -\frac{b-1}{2}n\log n - cn + \sqrt{\frac{n}{2}}\log n + \sqrt{n} + 3\right) . \end{aligned}$$

Since this bound decays superexponentially, the determinant \(T =\det (\mathbf {I}-\mathbf {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-\mathbf {M}(x))\) multiplied by the factor

$$\begin{aligned} -\frac{(b{{\sigma }({i_1})}-i_1)!\,(bi_1)!}{(b{{\sigma }({i_1})})!\, x^{i_1}} = -\frac{b!}{x} \frac{(b{{\sigma }({1})}-1)!}{(b{{\sigma }({1})})!} = -\frac{(b-1)!}{x {{\sigma }({1})}} \end{aligned}$$

or is zero (when \({{\sigma }({i_1})}=1\)). 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-\mathbf {M}(x))\). This gives us

$$\begin{aligned} |s_n|&\le \exp \left( -\frac{b-1}{2}n\log n - cn + n {{g}({n})} \right) \\&\qquad + (b-1)!\exp \left( -\frac{b-1}{2}(n+1)\log (n+1) - c(n+1) + (n+1) {{g}({n+1})}\right) \\&\le (1+(b-1)!)\exp \left( -\frac{b-1}{2}n\log n - cn + (n+1) {{g}({n})}\right) , \end{aligned}$$

which completes the proof. \(\square \)

Lemma 3.1 immediately yields a simple estimate for the tails of the power series S and T.

Lemma 3.2

Let \(N\in \mathbbm {N}\) and \(x\in \mathbbm {C}\), and let c and \({{g}({n})}\) be as in Lemma 3.1. Set

$$\begin{aligned} q = \frac{e^{{{g}({N})}} \left| {x}\right|}{e^c \sqrt{N^{b-1}}} \end{aligned}$$

and suppose that \(q<1\). Then we have the inequality

$$\begin{aligned} \left| {\sum _{n \ge N} t_n x^n}\right| \le \frac{q^N}{1-q} \end{aligned}$$

for the tails of the infinite sum in the determinant T. For the tails of the determinant S, we have the analogous inequality

$$\begin{aligned} \left| {\sum _{n \ge N} s_n x^n}\right| \le ((b-1)!+1)e^{g(N)}\frac{q^N}{1-q}. \end{aligned}$$

Proof

By Lemma 3.1 we have

$$\begin{aligned} \left| {t_n}\right| \le \exp \Big (-\frac{b-1}{2}n\log n - cn + n {{g}({n})} \Big ). \end{aligned}$$

Now we use monotonicity to obtain

$$\begin{aligned} \left| {\sum _{n \ge N} t_n x^n}\right| \le \sum _{n \ge N} \left( \frac{e^{{{g}({n})}} \left| {x}\right|}{e^c \sqrt{n^{b-1}}}\right) ^n \le \sum _{n \ge N} \left( \frac{e^{{{g}({N})}} \left| {x}\right|}{e^c \sqrt{N^{b-1}}}\right) ^n = q^N \frac{1}{1-q}. \end{aligned}$$

The second inequality follows in the same way. \(\square \)

4 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 \(\mathbf {M}\) does not represent an \(\ell _p\)-operator (one of their main requirements), due to the fact that its entries increase (and tend to \(\infty \)) along rows. However, we can adapt some of their ideas to our setting.

The main result of this section is the following lemma.

Lemma 4.1

For every \(b \ge 2\), the generating function \({{Q}({x})}\) has a simple pole at a positive real point \(\rho _b\) and no other poles with modulus \(< \rho _b + \epsilon _b\) for some \(\epsilon _b > 0\).

Proof of Lemma 4.1

First of all, we rule out the possibility that \({{Q}({x})}\) is entire by providing a lower bound for the coefficients \(q_b(m)\). To this end, consider compositions of 1 consisting of \(b-1\) copies of \(b^{-1},b^{-2},\ldots ,b^{1-m}\) and b copies of \(b^{-m}\). Since there are \(\frac{((b-1)m+1)!}{((b-1)!)^{m-1}b!}\) possible ways to arrange them in an order, we know that

$$\begin{aligned} q_b(m) \ge \frac{((b-1)m+1)!}{((b-1)!)^{m-1}b!}, \end{aligned}$$

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 \(\rho _b\), is also a singularity.

We already know that \({{Q}({x})}\) is meromorphic (being the quotient of two entire functions, see Sect. 2), hence \(\rho _b\) is a pole singularity. Since we can express \({{Q_b}({x})}\) as

$$\begin{aligned} {{Q_b}({x})} = \frac{x}{b!} \mathbf {e}_1^T (\mathbf {I}-\mathbf {M}(x))^{-1} \mathbf {e}_1, \end{aligned}$$

it is also meromorphic by the same argument. Moreover, we trivially have \({{Q_b}({x})} \le {{Q}({x})}\) for \(0 \le x < \rho _b\) as well as

$$\begin{aligned} {{Q_b}({x})} = \frac{x}{b!} + x \sum _{r \ge 1} \frac{r}{(b-1)!} {{Q_{br}}({x})} \ge \frac{x}{b!} \Big (1 + \sum _{r \ge 1} {{Q_{br}}({x})} \Big ) = \frac{x}{b!} {{Q}({x})}, \end{aligned}$$
(4.1)

which follows from (2.2). This means that the quotient \({{Q_b}({x})}/{{Q}({x})}\), which is again meromorphic (being the quotient of two meromorphic functions) is bounded above and below by positive constants as \(x \rightarrow \rho _b^-\). Thus it has a positive limit, which in turn means that \({{Q_b}({x})}\) also has a pole at \(\rho _b\) of the same pole order (which we will later show to be 1).

Now we split the identity (2.3). Let \(m_{11} = x/(b-1)!\) be the first entry of \(\mathbf {M}(x),\,\mathbf {c}\) the rest of the first column, \(\mathbf {r}\) the rest of the first row and \(\overline{\mathbf {M}}\) the matrix obtained from \(\mathbf {M}\) by removing the first row and the first column. Moreover, \(\overline{\mathbf {V}}\) is obtained from \(\mathbf {V}\) by removing the first entry \({{Q_b}({x})}\). Now we have

$$\begin{aligned} {{Q_b}({x})}= m_{11} {{Q_b}({x})} + \mathbf {r}\, \overline{\mathbf {V}} + \frac{x}{b!} \end{aligned}$$
(4.2)

and

$$\begin{aligned} \overline{\mathbf {V}} = \mathbf {c} {{Q_b}({x})} + \overline{\mathbf {M}}\, \overline{\mathbf {V}}, \end{aligned}$$

from which we obtain

$$\begin{aligned} \overline{\mathbf {V}} = (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c} {{Q_b}({x})}. \end{aligned}$$
(4.3)

Once again, the inverse \((\mathbf {I} - \overline{\mathbf {M}})^{-1}\) exists a priori in the ring of formal power series, but one can show that \(\det (\mathbf {I} - \overline{\mathbf {M}})\) is in fact an entire function, so the entries of the inverse are all meromorphic (see again the calculations in Sect. 3).

We can write Q(x) as

$$\begin{aligned} {{Q}({x})} = 1 + {{Q_b}({x})}+ \mathbf {1}^T \overline{\mathbf {V}} = 1 + \left( 1 + \mathbf {1}^T (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c} \right) {{Q_b}({x})}. \end{aligned}$$

The function given by \({{R_1}({x})} = 1 + \mathbf {1}^T (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c}\) must be meromorphic (since Q(x) and \(Q_b(x)\) are), and its coefficients in the power series expansion are all positive (since those of \(\mathbf {1},\,\mathbf {c}\) and \(\overline{\mathbf {M}}\) are and \((\mathbf {I} - \overline{\mathbf {M}})^{-1}\) can be expanded in a geometric series). In view of the inequality (4.1), it remains bounded as \(x \rightarrow \rho _b^{-}\), so its radius of convergence must be greater than \(\rho _b\) (meaning that it is analytic in a disk of larger radius).

Now we substitute (4.3) in (4.2) to obtain

$$\begin{aligned} {{Q_b}({x})}= m_{11} {{Q_b}({x})} + \mathbf {r} (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c} {{Q_b}({x})} + \frac{x}{b!} \end{aligned}$$

and thus

$$\begin{aligned} {{Q_b}({x})} = \frac{x}{b!} \left( 1 - m_{11} - \mathbf {r} (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c} \right) ^{-1}. \end{aligned}$$

Note that

$$\begin{aligned} {{R_2}({x})} = m_{11} + \mathbf {r} (\mathbf {I} - \overline{\mathbf {M}})^{-1} \mathbf {c} \end{aligned}$$

is also meromorphic, has only positive coefficients and remains bounded as \(x \rightarrow \rho _b^{-}\). Thus its radius of convergence is greater than \(\rho _b\) as well, and the unique positive real solution of the equation \({{R_2}({x})} = 1\) within the disk of convergence must be \(\rho _b\). Because of the positivity of the coefficients, there is no other solution to this equation with absolute value \(\rho _b\) or less. Moreover, \({{R_2'}({\rho _b})} > 0\), so \(\rho _b\) has multiplicity 1 as a solution of the equation \({{R_2}({x})} = 1\) and thus as a pole of \({{Q_b}({x})}\).

Finally, we can write

$$\begin{aligned} {{Q}({x})} = 1 + {{R_1}({x})} {{Q_b}({x})} = 1 + \frac{x}{b!} \cdot \frac{{{R_1}({x})}}{1-{{R_2}({x})}}. \end{aligned}$$

We know now that \({{R_1}({x})}\) and \({{R_2}({x})}\) are both analytic in a disk of radius greater than \(\rho _b\) around 0, that \(\rho _b\) is the only solution of the equation \({{R_2}({x})}= 1\) whose modulus is \(\rho _b\) or less, and that it has multiplicity 1. This means that \(\rho _b\) is a simple pole of \({{Q}({x})}\), and there are no further singularities of \({{Q}({x})}\) in a disk of radius \(\rho _b+\epsilon _b\) around 0 for suitable \(\epsilon _b > 0\). \(\square \)

5 Getting the Asymptotics

In this section, we prove Theorems 2 and 3, which give us constants \(\alpha ,\,\gamma \) and \(\kappa < 1\) such that for \(n=(b-1)m+1\)

$$\begin{aligned} \frac{{{\mathcal {W}_b}({s,n})}}{n!} = {{P_{b,s}}({m})} \gamma ^m \left( 1 + {{O}({\kappa ^m})}\right) \end{aligned}$$

holds, where \({{P_{b,s}}({m})}\) is a polynomial with leading term \(\alpha ^s m^{s-1}/(s-1)!\). Numerical values of the \(\alpha \) and \(\gamma \) can be found in Table 1. It is explained in the next section how these numerical values are determined in a reliable way. The proof is the same for all b, except for the fact that different constants occur.

Table 1 Truncated decimal values for the constants of Theorem 3

Proof of Theorem 3

By now, we know that the function \({{Q}({x})}\) can be written as the quotient of two entire functions, cf. Sect. 2 and Lemma 3.1. More specifically, we use

$$\begin{aligned} Q(x) = 1 + \frac{x}{b!} \frac{{{S}({x})}}{{{T}({x})}}. \end{aligned}$$

As Lemma 4.1 shows, Q(x) has exactly one pole \(\rho \) (which is a simple pole) inside some disk with radius \(\rho +\epsilon ,\,\epsilon >0\), around 0. Thus we can directly apply singularity analysis [6] in the meromorphic setting (cf. Theorem IV.10 of [8]) to obtain

$$\begin{aligned} \frac{q_b(m)}{((b-1)m+1)!}&= - \frac{{{S}({\rho })}}{b!{{T'}({\rho })}} \rho ^{-m} + {{O}({(\rho +\epsilon )^{-m}})}. \end{aligned}$$

This finishes the proof for \(s=1\). Note that \(\gamma =1/\rho \).

In the general case (arbitrary s), we use the relation

$$\begin{aligned} \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({s,n})}}{n!} x^n = \bigg ( \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({1,n})}}{n!} x^n \bigg )^s, \end{aligned}$$

which follows from Eq. (1.3) and gives us

$$\begin{aligned} \sum _{m=0}^{\infty } \frac{{{\mathcal {W}_b}({s,(b-1)m+s})}}{((b-1)m+s)!} x^m = Q(x)^s. \end{aligned}$$

Once again, we make use of the fact here that the (exponential) generating function is meromorphic, cf. Sect.2. The singular expansion of \(Q(x)^s\) at \(x = \rho = 1/\gamma \) is given by

$$\begin{aligned} Q(x)^s = \Big ( \frac{\alpha }{1-\gamma x} + {{O}({1})} \Big )^s, \end{aligned}$$

which has \(\alpha ^s / (1-\gamma 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. \(\square \)

6 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 improve the bounds found in Sect. 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-\mathbf {M}(x))\) is given by

$$\begin{aligned} \left| {t_n}\right| \le \sum _{h \ge 0} h! \sum _{\begin{array}{c} 1\le i_1<i_2<\dots <i_h \\ i_1,\dots ,i_h\in \mathbbm {N}\\ i_1+i_2+\cdots +i_h = n \end{array}} \exp \Big ( - (b-1)n \Big ( \log \frac{(b-1)n}{h} - 1 \Big ) \Big ). \end{aligned}$$
(6.1)

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 obtained earlier. For example, for \(b=2\), we have \( \left| {t_{60}}\right| \le 5.96\cdot 10^{-14}\) with this method, whereas Lemma 3.1 would give the bound 0.00014.

Remark 6.2

We can also get tighter bounds in Lemma 3.2 using the ideas presented in Remark 6.1. We can even use combinations of those bounds: For \(M>N\), we separate

$$\begin{aligned} \left| {\sum _{n \ge N} t_n x^n}\right| \le \sum _{M > n \ge N} \left| {t_n}\right| \left| {x}\right|^n + \left| {\sum _{n \ge M} t_n x^n}\right| \end{aligned}$$

and use the bound (6.1) for \(M > n \ge N\) and Lemma 3.2 (tightened by some ideas from Remark 6.1) for the sum over \(n \ge M\). For example, again for \(b=2\), we obtain the tail-bound

$$\begin{aligned} \left| {\sum _{n \ge 60} t_n x^n}\right| \le 8.051\cdot 10^{-14} + 4.068\cdot 10^{-15} \end{aligned}$$

for \( \left| {x}\right| \le 1\), where \(M=86\) was chosen. (We will denote the constant on the right hand side of the inequality above by \(B_{T_{60}}\), see the proof of Lemma 6.3.) Using Lemma 3.2 directly would just give 0.00103.

To get numerical values for the constants in Theorem 2 (i.e., \(b=2\)), we have to work with the representation

$$\begin{aligned} Q(x) = 1 + \frac{x {{S}({x})}}{2{{T}({x})}}, \end{aligned}$$

where the first few terms of these power series are given by

$$\begin{aligned} {{S}({x})} = \mathbf {1}^T {\text {adj}}(I-\mathbf {M}(x)) \mathbf {e}_1 = \det (M^*(x)) = 1 - \tfrac{5}{12} x^2 - \tfrac{1}{6} x^3 - \tfrac{1}{24} x^4 + \tfrac{1}{45} x^5 + \cdots \end{aligned}$$

and

$$\begin{aligned} {{T}({x})} = \det (I-\mathbf {M}(x)) = 1 - x - \tfrac{1}{2} x^2 + \tfrac{1}{6} x^3 + \tfrac{1}{8} x^4 + \tfrac{3}{40} x^5 + \cdots , \end{aligned}$$

cf. Sects. 2 and 5. We obtain the following result for the denominator \({{T}({x})}\).

Lemma 6.3

For \(b=2\), the function \({{T}({x})}\) has exactly one zero with \( \left| {x}\right| < \frac{3}{2}\). This simple zero lies at \(x_0 = 0.83845184342\dots \).

Remark 6.4

Note that \(1/x_0 = \gamma = 1.192674341213\dots \), which is indeed the constant found by Molteni in [18].

Proof of Lemma 6.3

Denote the polynomials consisting of the first N terms of \({{T}({x})}\) by \({{T_N}({x})}\). We have \( \left| {{{T}({x})} - {{T_{60}}({x})}}\right| \le B_{T_{60}}\) with \(B_{T_{60}} = 1.17\cdot 10^{-13}\), see Lemma 3.2 and Remark 6.2. On the other hand, we have \( \left| {{{T_{60}}({x})}}\right| > 0.062\) for \( \left| {x}\right| = \frac{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 \( \left| {x}\right|<\frac{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 \(\frac{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 \(\frac{3}{2} I\)) plus interval arithmetic, we find an interval that contains \(x_0\). From this, we can extract correct digits of \(x_0\). \(\square \)

From this result, which gives the numerical value of the dominant singularity, we can compute all the constants in Theorem 2. Numerical values of the constants in the general case of Theorem 3 are obtained analogously. The values of those constants for the first few b can be found in Table 1. The following remark gives some further details of the computation.

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 Sect. 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 \( \left| {{{T'}({x})} - {{T'_{60}}({x})}}\right| \le B_{T'_{60}}\) with \(B_{T'_{60}} = 8.397\cdot 10^{-12}\). We also have \( \left| {{{S}({x})} - {{S_{60}}({x})}}\right| \le B_{S_{60}}\) with \(B_{S_{60}} = 1.848\cdot 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.

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:

$$\begin{aligned} {{\mathcal {W}_2}({1,n})}/ n!&= 0.296372049053529075588648642133 \\&\quad \cdot 1.192674341213466032221288982529^{n-1} \\&\quad +\,0.119736335383631653495068554245 \\&\quad \cdot 0.643427418149500070120570318509^{n-1} \\&\quad +\,0.0174783635210388007051384381833 \\&\quad \cdot (-0.5183977738993377728627273570710)^{n-1} \\&\quad +\,\cdots \end{aligned}$$

However, the numerical approximations lack the “certifiability” of e.g. those in Table 1.

7 Maximum Number of Representations

Let \({{{\mathcal {U}}_b}({\ell ,n})}\) and \({{\mathcal {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 \({{{\mathcal {U}}_b}({\ell ,n})}\) over all \(\ell \), i.e., we have

$$\begin{aligned} {{M}({n})} = \max _{\ell \ge 1}\, {{{\mathcal {U}}_b}({\ell ,n})} = \max _{s \ge 1}\, {{\mathcal {W}_b}({s,n})}. \end{aligned}$$

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

$$\begin{aligned} {{W}({x})}= \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({1,n})}}{n!} x^n. \end{aligned}$$

Further, denote by \(\theta = \theta _b\) the unique positive real solution (the power series W has real, nonnegative coefficients) of the equation \({{W}({\theta })}=1\), and set \(\nu = \nu _b =1/\theta _b\) (as usual, constants depend on b, but we will leave out the subscript b). We prove the following theorem, which is a generalized version of Theorem 4.

Theorem 5

With the notions of \({{W}({x})},\,\theta \) and \(\nu \) as above, we have

$$\begin{aligned} {{M}({n})}/n! \le \nu ^n \end{aligned}$$
(7.1)

for all \(n \ge 1\), and the constant is optimal: We have the more precise asymptotic formula

$$\begin{aligned} {{M}({n})}/n! = \lambda n^{-1/2} \nu ^n \big ( 1 + {{O}\big ({n^{-1/2}}\big )} \big ) \end{aligned}$$

with \(\lambda = (b-1) \left( \theta {{W'}({\theta })}\sigma \sqrt{2\pi } \right) ^{-1}\), where \(\sigma >0\) is defined by

$$\begin{aligned} \sigma ^2 = \frac{{{W''}({\theta })}}{\theta {{W'}({\theta })}^3} + \frac{1}{\theta ^2 {{W'}({\theta })}^2} - \frac{1}{\theta {{W'}({\theta })}}. \end{aligned}$$

Moreover, the maximum \({{M}({n})}= \max _{s\ge 1}\, {{\mathcal {W}_b}({s,n})}\) is attained at \(s = \mu n + {{O}({1})}\) with the constant \(\mu = \left( \theta {{W'}({\theta })} \right) ^{-1}\).

In Table 2, we are listing numerical values for the constants of Theorem 5. These values are simply calculated by using a finite approximation to \({{W}({x})}\), namely \({{W_N}({x})} = \sum _{n=1}^{N} \frac{{{\mathcal {W}_b}({1,n})}}{n!} x^n\) for some precision N.

Table 2 Values (numerical approximations) for the constants of Theorem 5

We start with the upper bound (7.1) of Theorem 5, which is done in the following lemma.

Lemma 7.1

We have

$$\begin{aligned} {{M}({n})}/n! \le \nu ^n \end{aligned}$$

for all \(n \ge 1\).

Proof

Recall that Eq. (1.3) gives us

$$\begin{aligned} \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({s,n})}}{n!} x^n = \bigg ( \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({1,n})}}{n!} x^n \bigg )^s = {{W}({x})}^s. \end{aligned}$$

Since \(\theta > 0\) was chosen such that \({{W}({\theta })}= 1\), it clearly follows that

$$\begin{aligned} \sum _{n=1}^{\infty } \frac{{{\mathcal {W}_b}({s,n})}}{n!} \theta ^n = 1, \end{aligned}$$

hence \({{\mathcal {W}_b}({s,n})}/n! \le \theta ^{-n}\) for all s and n, and taking the maximum over all \(s \ge 1\) yields

$$\begin{aligned} {{M}({n})}/n! = \max _{s \ge 1}\, {{\mathcal {W}_b}({s,n})}/n! \le \theta ^{-n} = \nu ^n, \end{aligned}$$

which is what we wanted to show. \(\square \)

It remains to prove the asymptotic formula for \({{M}({n})}\). We first gather some properties of the solution \(x={{\theta }({u})}\) of the functional equation \({{W}({x})}=1/u\).

Lemma 7.2

For \(u\in \mathbbm {C}\) with \( \left| {u}\right|\le 1\) and \( \left| {{\text {Arg}}\, u}\right| \le \frac{\pi }{b-1}\), each root x of \({{W}({x})}= 1/u\) satisfies the inequality \( \left| {x}\right| \ge \theta \), where equality holds only if \(x = \theta \) and \(u =1\).

Proof

Let u be as stated in the lemma. By the nonnegativity of the coefficients of W and the triangle inequality, we have

$$\begin{aligned} {{W}({\theta })}= 1 \le \left| {1/u}\right| = \left| {{{W}({x})}}\right| \le {{W}({ \left| {x}\right|})}. \end{aligned}$$
(7.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 \( \left| {x}\right| = \theta \).

Since the coefficients \({{\mathcal {W}_b}({1,n})}\) are nonzero only for \(n\equiv 1 \hbox { mod }(b-1)\), we can write \({{W}({x})} = x {{V}({x^{b-1}})}\). From (7.2), we obtain

$$\begin{aligned} W(\theta ) = \theta {{V}\big ({\theta ^{b-1}}\big )}= \left| {x}\right| \left| {{{V}\big ({x^{b-1}}\big )}}\right| = \left| {W(x)}\right|. \end{aligned}$$

Since the coefficients of V are indeed positive, the power series V is aperiodic.Footnote 2 Therefore, the inequality \( \left| { {{V}\big ({x^{b-1}}\big )} }\right| \le {{V}\big ({ \Big | {x^{b-1}}\Big |}\big )}\) is strict, i.e., we have \( \left| { {{V}\big ({x^{b-1}}\big )} }\right| < {{V}\big ({ \Big | {x^{b-1}}\Big |}\big )}\) (which would yield a contradiction to the assumption that \( \left| {x}\right|=\theta \)) unless \(x^{b-1}\) is real and positive, which means that \(x^{b-1} = \theta ^{b-1}\). When this is the case, we have

$$\begin{aligned} \frac{\theta }{u} = \theta {{W}({x})}= \theta x {{V}\big ({x^{b-1}}\big )}= x \theta {{V}\big ({\theta ^{b-1}}\big )} = x {{W}({\theta })}= x, \end{aligned}$$

so \( \left| {{\text {Arg}}\, x}\right| = \left| {-{\text {Arg}}\,u}\right| \le \frac{\pi }{b-1}\). This means that \(x^{b-1}\) can only be real and positive if x is itself real and positive, which implies that \(x = \theta \) and \(u = 1\). \(\square \)

The following lemma tells us that the single dominant root of \({{W}({x})}=1\) is the simple zero \(\theta \).

Lemma 7.3

There exists exactly one root of \({{W}({x})}=1\) with \( \left| {x}\right|\le \theta \), namely \(\theta \). Further, \(\theta \) is a simple root, and there exists an \(\epsilon >0\) such that \(\theta \) is the only root of \({{W}({x})}=1\) with absolute value less than \(\theta +\epsilon \).

Proof

By Lemma 7.2 with \(u=1\), the positive real \(\theta \) is the unique root of \({{W}({x})}=1\) with minimal absolute value. This proves the first part of the lemma.

Using Theorem 3, we get

$$\begin{aligned} \left| {{{W}({x})}}\right| = {{O}}\left( {{\sum _{m=0}^\infty \gamma ^m \left| {x}\right|^{(b-1)m}}}\right) , \end{aligned}$$

which is bounded for \( \left| {x}\right|<1/\gamma ^{1/(b-1)}\). Therefore, the radius of convergence r of W is at least \(1/\gamma ^{1/(b-1)}>\theta \), and so W is holomorphic inside a disk that contains \(\theta \). Since zeros of holomorphic functions do not accumulate, the existence of a suitable \(\epsilon >0\) as desired follows.

The root \(\theta \) is simple, since W(x) is strictly increasing on (0, r). \(\square \)

We are now ready to prove the asymptotic formula for \({{M}({n})}\). To this end, we consider the bivariate generating function

$$\begin{aligned} {{G}({x,u})} = 1 + \sum _{n=1}^{\infty } \sum _{s=1}^{\infty } \frac{{{\mathcal {W}_b}({s,n})}}{n!} x^nu^s = \sum _{s=0}^{\infty } {{W}({x})}^su^s = \frac{1}{1-u{{W}({x})}}. \end{aligned}$$

In order to get \(\max _{s\ge 1}\, {{\mathcal {W}_b}({s,n})}\), we show that the coefficients varying with s fulfil a local limit law (as n tends to \(\infty \)). The maximum is then attained close to the mean.

Proof of Theorem 5

Set

$$\begin{aligned} {{g_n}({u})}= [x^n] {{G}({x,u})} = \sum _{s=1}^{\infty } \frac{{{\mathcal {W}_b}({s,n})}}{n!} u^s. \end{aligned}$$

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 Sedgewick [8]. An important detail here is the fact that \(\frac{{{\mathcal {W}_b}({s,n})}}{n!} = [u^sx^n] {{G}({x,u})}\) can only be nonzero if \(s \equiv n \hbox { mod }(b-1)\), hence \(g_n\) can also be expressed as

$$\begin{aligned} g_n(u) = u^r h_n(u^{b-1}), \end{aligned}$$

where \(r \in \{0,1,\ldots ,b-2\}\) is chosen in such a way that \(r \equiv n \hbox { mod }(b-1)\). This is also the reason why it was enough in Lemma 7.2 to consider the case \({|}{{\text {Arg}}}\, u| \le \frac{\pi }{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=\theta \) and no other singularities with absolute values smaller than \(\theta +\epsilon \). The denominator \(1-u {{W}({x})}\) is analytic and not degenerated at \((x,u)=(\theta ,1)\); the latter since its derivative with respect to x is \({{W'}({\theta })}\ne 0\) (\(\theta \) is a simple root of F) and its derivative with respect to u is \(-{{W}({\theta })}=-1\ne 0\).

Thus the function \({{\theta }({u})}\) which gives the solution to the equation \(W(\theta (u)) = 1/u\) with smallest modulus has the following properties: it is analytic at \(u=1\), it fulfils \(\theta (1)=\theta \), and for some \(\epsilon > 0\) and u in a suitable neighbourhood of 1, there is no \(x \ne \theta (u)\) with \(W(x) = 1/u\) and \(|x| \le \theta + \epsilon \).

Therefore, by Cauchy’s integral formula and the residue theorem, we obtain

$$\begin{aligned} {{g_n}({u})}&= -{{{\text {Res}}}\left( {\frac{1}{1-u W(x)} x^{-n-1}, x=\theta (u)}\right) }+\frac{1}{2\pi i} \oint _{ \left| {x}\right|=\theta +\epsilon } {{G}({z,u})} \frac{{\text {d}}\!{}z}{z^{n+1}} \\&= \frac{1}{u {{\theta }({u})} W'({{\theta }({u})}) } \left( \frac{1}{{{\theta }({u})}}\right) ^n + {{O}({(\theta +\epsilon )^{-n}})} \end{aligned}$$

for u in a suitable neighbourhood of 1.

To get the results claimed in Theorem 5, we use a local version of the quasi-power theorem, see Theorem IX.14 of [8] or Hwang’s original paper [10]. Set

$$\begin{aligned} {{A}({u})} = \left( u {{\theta }({u})} W'({{{\theta }({u})}}) \right) ^{-1} \end{aligned}$$

and

$$\begin{aligned} {{B}({u})}= \left( {{\theta }({u})} \right) ^{-1}, \end{aligned}$$

so that

$$\begin{aligned} g_n(u) = A(u) B(u)^n + {{O}({(\theta +\epsilon )^{-n}})}. \end{aligned}$$

In terms of \(h_n\), this becomes

$$\begin{aligned} h_n(v) = v^{-r/(b-1)} A(v^{1/(b-1)}) B(v^{1/(b-1)})^n + {{O}({(\theta +\epsilon )^{-n}})}. \end{aligned}$$

Here, \(v^{1/(b-1)}\) is taken to be the principal \((b-1)\)th root of v, which satisfies \( \left| {{\text {Arg}}\,v^{1/(b-1)}}\right| \le \frac{\pi }{b-1}\).

Since \({{\theta }({u})} \ne 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 \(\theta (1) = \theta \) as well and has a nonzero derivative there). Moreover, we can use the fact that \( \left| {{{\theta }({e^{i\varphi }})} }\right|\) has a unique minimum at \(\varphi =0\) if we assume that \( \left| {\varphi }\right| \le \frac{\pi }{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

$$\begin{aligned} \frac{{\mathcal {W}_b}({s,n})}{n!}= & {} \frac{(b-1){{A}({1})} {{B}({1})}^n}{\sigma \sqrt{2\pi n}} {{{\text {exp}}}\left( {-\frac{t^2}{2\sigma ^2}}\right) } \left( 1+{{O}({\frac{1}{\sqrt{n}}})}\right) \nonumber \\= & {} \frac{(b-1)\nu ^n}{\theta {{W'}({\theta })} \sigma \sqrt{2\pi n}} {{{\text {exp}}}\left( {-\frac{t^2}{2\sigma ^2}}\right) } \left( 1+ {{O}({\frac{1}{\sqrt{n}}})}\right) , \end{aligned}$$
(7.3)

where \(t=(s-\mu n)/\sqrt{n}\). Values of t outside of the central region can be treated by standard tail estimates. Mean and variance can be calculated as follows. We have

$$\begin{aligned} \mu = \frac{{{B'}({1})}}{{B}({1})}= - \frac{{{\theta '}({1})}}{{{\theta }({1})}} = \frac{1}{\theta {{W'}({\theta })}}, \end{aligned}$$

and \(\sigma >0\) is determined by

$$\begin{aligned} \sigma ^2&= \frac{{{B''}({1})}}{{{B}({1})}} + \frac{{{B'}({1})}}{{{B}({1})}} - \left( \frac{{{B'}({1})}}{{{B}({1})}}\right) ^2 = - \frac{{{\theta ''}({1})}}{{{\theta }({1})}} - \frac{{{\theta '}({1})}}{{{\theta }({1})}} + \left( \frac{{{\theta '}({1})}}{{{\theta }({1})}}\right) ^2\\&= \frac{{{W''}({\theta })}}{\theta {{W'}({\theta })}^3} - \frac{1}{\theta {{W'}({\theta })}} + \frac{1}{\theta ^2 {{W'}({\theta })}^2}, \end{aligned}$$

where we used implicit differentiation of \(W({{{\theta }({u})}}) = 1/u\) to get expressions for \({{\theta '}({u})}\) and \({{\theta ''}({u})}\).

The value \({{\mathcal {W}_b}({s,n})}/n!\) is maximal with respect to s when \(s = \mu n + {{O}({1})}\). Its asymptotic value can then be calculated by (7.3). \(\square \)

8 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 again that we suppress the dependence on b in all constants.

Theorem 6

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 \(\mu _\ell n + {{O}({1})}\) and variance \(\sigma _\ell ^2 n + {{O}({1})}\).

Numerical approximations to the values of \(\mu _\ell \) and \(\sigma _\ell ^2\) can be found in Table 3. The proof runs along the same lines as the proofs of Theorems 3 and 5, so we only give a sketch here.

Table 3 Values (numerical approximations) for the constants of Theorems 6 and 7

Sketch of proof of Theorem 6

We start by considering a bivariate generating function for the investigated parameter. In the recursive step described in Sect. 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 \(\ell (\mathbf {k})\) denotes the exponent of the largest denominator that occurs in a composition (or partition) \(\mathbf {k}\), then the bivariate generating function

$$\begin{aligned} {{L_r}({x,y})} = \sum _{n \ge 0} \sum _{\mathbf {k} \in \mathcal {C}_{n,r}} \frac{1}{((b-1)n+1)!}\, x^ny^{\ell (\mathbf {k})} = \sum _{n \ge 0} \sum _{\mathbf {k} \in \mathcal {P}_{n,r}} \mathsf {w}(\mathbf {k})\, x^n y^{\ell (\mathbf {k})} \end{aligned}$$

satisfies \({{L_1}({x,y})} = 1\) and

$$\begin{aligned} {{L_{bs}}({x,y})} = x^s y \sum _{r \ge s} \frac{r!}{(r-s)!\,(bs)!} {{L_r}({x,y})}. \end{aligned}$$

So if we set \(\mathbf {V}(x,y) = ({{L_b}({x,y})}, {{L_{2b}}({x,y})}, {{L_{3b}}({x,y})}, \ldots )^T\), then we now have

$$\begin{aligned} \mathbf {V}(x,y) = \frac{xy}{b!} (I-y\,\mathbf {M}(x))^{-1} \mathbf {e}_1 \end{aligned}$$

in analogy to (2.4) with the same infinite matrix as in Sect. 2. Moreover, we obtain

$$\begin{aligned} {{L}({x,y})} = \sum _{r \ge 1} {{L_r}({x})}= y + \mathbf {1}^T \mathbf {V}(x,y) = 1 + \frac{xy}{b!} \mathbf {1}^T (I-y\,\mathbf {M}(x))^{-1} \mathbf {e}_1. \end{aligned}$$

It follows by the same estimates as in Sect. 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]. \(\square \)

For the number of distinct parts we prove the following result.

Theorem 7

The number of distinct parts in a random composition of 1 into \(m = (b-1)n+1\) parts is asymptotically normally distributed with mean \(\mu _d n + {{O}({1})}\) and variance \(\sigma _d^2 n + {{O}({1})}\).

Approximations of the constants can be found in Table 3. Again we only sketch the proof, since it uses the same ideas.

Sketch of proof of Theorem 7

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(\mathbf {k})\) be the number of distinct parts in \(\mathbf {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

$$\begin{aligned} {{D_r}({x,y})}= \sum _{n \ge 0} \sum _{\mathbf {k} \in \mathcal {C}_{n,r}} \frac{1}{((b-1)n+1)!}\, x^ny^{d(\mathbf {k})} = \sum _{n \ge 0} \sum _{\mathbf {k} \in \mathcal {P}_{n,r}} \mathsf {w}(\mathbf {k})\, x^n y^{d(\mathbf {k})}. \end{aligned}$$

Then we have \({{D_1}({x,y})} = y\) and

$$\begin{aligned} {{D_{bs}}({x,y})}= \frac{s!\, x^s}{(bs)!} {{D_s}({x,y})}+ x^s y \sum _{r > s} \frac{r!}{(r-s)!\,(bs)!} {{D_r}({x,y})}. \end{aligned}$$

Once again, we take the infinite vector \(\mathbf {V}(x,y) = ({{D_b}({x,y})}, {{D_{2b}}({x,y})}, {{D_{3b}}({x,y})}, \ldots )^T\), and we define a modified version \(\tilde{M}\) of the infinite matrix by its entries

$$\begin{aligned} \tilde{m}_{ij} = {\left\{ \begin{array}{ll} \frac{(bj)!\,x^iy}{(bj-i)!\,(bi)!} &{}\quad \text {if } i < bj, \\ \frac{i!\,x^i}{(bi)!} &{}\quad \text {if } i = bj, \\ 0 &{}\quad \text {otherwise.} \end{array}\right. } \end{aligned}$$

Now

$$\begin{aligned} \mathbf {V}(x,y) = \frac{xy}{b!} (I-\tilde{M}(x))^{-1} \mathbf {e}_1 \end{aligned}$$

in analogy to (2.4), and moreover

$$\begin{aligned} {{D}({x})} = \sum _{r \ge 1} {{D_r}({x})} = y + \mathbf {1}^T \mathbf {V}(x,y) = y + \frac{xy}{b!} \mathbf {1}^T (I-\tilde{M}(x))^{-1} \mathbf {e}_1. \end{aligned}$$

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. \(\square \)