Binomsums
Binomsums
Introduction
The computation of definite sums in computer algebra is classically handled by
the method of creative telescoping initiated in the 1990s by Zeilberger (Zeilberger
1990, 1991a; Wilf and Zeilberger 1992). For example, it applies to sums like
3
n n k n X n 2
4k
X X X n X i+j 4n − 2i − 2j
(1) 2k
, or .
j j 2n − 2i
k=0 k k=0 j=0 i=0 j=0
P
In order to compute a sum k u(n, k) of a bivariate sequence u, this method
computes an identity of the form
ap (n)u(n + p, k) + · · · + a0 (n)u(n, k) = v(n, k + 1) − v(n, k).
Provided that it is possible to sum both sides over k and that the sequence v
vanishes at the endpoints of the domain of summation, the left-hand side—called
a telescoper—gives a recurrence for the sum. The sequence v is then called the
certificate of the identity.
In the case of multiple sums, this idea leads to searching for a telescoping identity
of the form
The partial integral with respect to x3 along the circle |x3 | = 12 is the sum of the
residues of the rational function being integrated at the poles whose modulus is
less than 12 . When |t| is small and |x1 | = |x2 | = 12 , the poles coming from the
Q3
factor x21 x22 x23 − t i=1 (1 + xi )2 all have a modulus that is smaller than 12 : they
are asymptotically proportional to |t|1/2 . In contrast, the poles coming from the
Q3
factor 1 − t i=1 (1 + xi )2 behave like |t|−1/2 and have all a modulus that is bigger
than 12 . In particular, any two poles that come from the same factor are either both
asymptotically small or both asymptotically large. This implies that the partial
integral is a rational function of t, x1 and x2 ; and we compute that
I
1 x1 x2 dx1 dx2
y(t) = .
(2iπ)2 γ×γ x21 x22 − t(1 + x1 )2 (1 + x2 )2 (1 − x1 x2 )2
This formula echoes the original proof of Dixon (1891) in which the left-hand side
of (3) is expressed as the coefficient of (xy)4n in ((1 − y 2 )(1 − z 2 )(1 − y 2 z 2 ))2n .
Using any algorithm that performs definite integration of rational functions (Chyzak
4 A. BOSTAN, P. LAIREZ, AND B. SALVY
2000; Koutschan 2010; Lairez 2016) reveals a differential equation satisfied by y(t):
t(27t + 1)y 00 + (54t + 1)y 0 + 6y = 0.
Looking at the coefficient of tn in this equality leads to the recurrence relation
3(3n + 2)(3n + 1)un + (n + 1)2 un+1 = 0,
P2n 3
where un = k=0 (−1)k 2n k . Since u0 = 1, it leads to a proof of Dixon’s identity
by induction on n. The treatment above differs in one important aspect from what
follows: the use of genuine integrals and explicit integration paths rather than
formal residues that will be introduced in §2.
Comparison with creative telescoping. As mentioned above, the computation
of multiple binomial sums can be handled by the method of creative telescoping.
The amount of work in this direction is considerable and we refer the reader to
surveys (Chyzak 2014; Koutschan 2013). In the specific context of multiple sums,
the most relevant works are those of Wegschaider (1997), Chyzak (2000), Apagodu
and Zeilberger (2006), and Garoufalidis and Sun (2010). We show on the example
of Dixon’s identity how the method of creative telescoping and the method of
generating functions differ fundamentally even on a single sum.
3
Let un,k = (−1)k 2n
k . This bivariate sequence satisfies the recurrence relations
(2n + 2 − k)3 (2n + 1 − k)3 un+1,k − 8(1 + n)3 (1 + 2n)3 un,k = 0
(4)
and (k + 1)3 un,k+1 + (2n − k)3 un,k = 0.
With these relations as input, Zeilberger’s algorithm finds the sequence
P (n, k)
vn,k = un,k ,
2(2n + 2 − k)3 (2n + 1 − k)3
where P (n, k) = k 3 (9k 4 n − 90k 3 n2 + 348k 2 n3 − 624kn4 + 448n5
+ 6k 4 − 132k 3 n + 792k 2 n2 − 1932kn3 + 1760n4 − 48k 3 + 594k 2 n
− 2214kn2 + 2728n3 + 147k 2 − 1113kn + 2084n2 − 207k + 784n + 116),
that satisfies
(5) 3(3n + 2)(3n + 1)un,k + (n + 1)2 un+1,k = vn,k+1 − vn,k .
Whatever the way the sequence vn,k is found, it is easy to check the telescopic
relation (5): using the recurrence relations for un,k , each of the four terms in (5)
rewrites in the form R(n, k)un,k , for some rational function R(n, k). However,
for some specific values of n and k, the sequence vn,k is not defined, due to the
denominator.
P2n
To deduce a recurrence relation for an = k=0 un,k , it is desirable to sum the
telescopic relation (5), over k, from 0 to 2n + 2. Unfortunately, that would hit the
forbidden set where vn,k is not defined. We can only safely sum up to k = 2n − 1.
Doing so, we obtain that
2n−1
X 2n−1
X
3(3n + 2)(3n + 1) un,k + (n + 1)2 un+1,k = vn,2n − vn,0 ,
k=0 k=0
and then
It turns out that 3(3n + 2)(3n + 1)un,2n + (n + 1)2 (un+1,2n+2 + un+1,2n+1 + un+1,2n )
evaluates exactly to the right-hand side of the above identity, and this leads to
Dixon’s identity.
In this example, spurious singularities clearly appear in the range of summation.
Thus, deriving an identity such as Dixon’s from a telescopic identity such as (5) is
not straightforward and involves the certificate. A few works address this issue for
single sums (Abramov and Petkovšek 2005; Abramov 2006), but none for the case
of multiple sums: existing algorithms (Wegschaider 1997; Chyzak 2000; Garoufalidis
and Sun 2010) only give the telescopic identity without performing the summation.
A recent attempt by Chyzak et al. (2014) to check the recurrence satisfied by Apéry’s
sequence in the proof assistant Coq has shown how difficult it is to formalize this
summation step. Note that because of this issue, even the existence of a linear
recurrence for such sums can hardly be inferred from the fact that the algorithm of
creative telescoping always terminates with success.
This issue is rooted in the method of creative telescoping by the fact that
sequences are represented through the linear recurrence relations that they satisfy.
Unfortunately, this representation is not very faithful when the leading terms of
the relations vanish for some values of the indices. The method of generating
functions avoids this issue. For example, the binomial coefficient nk is represented
unambiguously as the coefficient of xk in (1 + x)n (to be understood as a power series
when n < 0), rather than as a solution to the recurrence relations (n−k) nk = n n−1
k
and k nk = n n−1
k−1 .
Related work. The method of generating functions is classical and has been largely
studied, in particular for the approach described here by Egorychev (1984), see
also (Egorychev and Zima 2008). Egorychev’s method is a general approach to
summation, but not quite an algorithm. In this work, we make it completely effective
and practical for the class of binomial sums.
The special case when the generating functions are differentially finite (D-finite)
has been studied by Lipshitz (1989). From the effectivity point of view, the starting
point is his proof that diagonals of D-finite power series are D-finite (Lipshitz 1988).
The argument, based on linear algebra, is constructive but does not translate into
an efficient algorithm because of the large dimensions involved. This led Wilf and
Zeilberger (1992, p. 596) to comment that “This approach, while it is explicit in
principle, in fact yields an infeasible algorithm.” Still, using this construction of
diagonals, many closure properties of the sequences under consideration (called
P-recursive) can be proved (and, in principle, computed). Then, the representation
of a convergent definite sum amounts to evaluating a generating series at 1 and this
proves the existence of linear recurrences for the definite sums of all P-recursive
sequences. Abramov and Petkovšek (2002) showed that in particular the so-called
proper hypergeometric sequences are P-recursive in the sense of Lipshitz. The proof is
also constructive, relying on Lipshitz’s construction of diagonals to perform products
of sequences.
While we are close to Lipshitz’s approach, three enhancements make the method
of generating functions presented here efficient: we use more efficient algorithms for
computing multiple integrals and diagonals that have appeared in the last twenty
years (Chyzak 2000; Koutschan 2010; Bostan et al. 2013a; Lairez 2016); we restrict
ourselves to binomial sums, which makes it possible to manipulate the generating
functions through rational integral representations (see §2.2 and §2.3); and a third
6 A. BOSTAN, P. LAIREZ, AND B. SALVY
decisive improvement comes with the geometric reduction procedure for simplifying
integral representations (see §5).
Creative telescoping is another summation algorithm developed by Zeilberger
(1991b) and proved to work for all proper hypergeometric sequences (Wilf and
Zeilberger 1992). This method has the advantage of being applicable and often
efficient in practice. However, as already mentioned, it relies on certificates whose size
grows fast with the number of variables (Bostan et al. 2013a) and, more importantly,
whose summation is not straightforward, making the complete automation of the
method problematic. For proper hypergeometric sums, a different effective approach
developed by Takayama (1995) does not suffer from the certificate problem. It
consists in expressing the sum as the evaluation of a hypergeometric series and
reducing its shifts with respect to a non-commutative Gröbner basis of the contiguity
relations of the series, reducing the question to linear algebra in the finite-dimensional
quotient.
The class of sums we consider is a subclass of the sums of proper hypergeometric
sequences. We give an algorithm that avoids the computation of certificates in that
case, and relies on an efficient method to deal with the integral representations of
sums. The same approach has been recently used by Bostan et al. (2013b) on various
examples, though in a less systematic manner. Examples in §7 give an idea of the
extent of the class we are dealing with. It is a subclass of the balanced multisums,
shown by Garoufalidis (2009) to possess nice asymptotic properties. More recently,
a smaller family of binomial multisums was studied by Garrabrant and Pak (2014):
they are further constrained to be diagonals of N-rational power series.
Acknowledgments. We thank Marko Petkovšek for orienting us in some of the
literature. This work has been supported in part by FastRelax ANR-14-CE25-0018-01
and by the research grant BU 1371/2-2 of the Deutsche Forschungsgemeinschaft.
this work as defined to be the coefficient of xk in the formal power series (1 + x)n .
In other words,
n n(n − 1)(n − 2) · · · (n − k + 1) n
= for k > 0 and = 0 for k < 0.
k k! k
P0 b
For all a, b ∈ Z, we define the directed sum k=a as
P
b
b k=a uk if a 6 b,
X 0 def
uk = 0 if a = b + 1,
k=a − Pa−1 u if a > b + 1,
k=b+1 k
Pb
in contrast with the usual convention that k=a uk = 0 when a > b. This implies
the following flexible summation rule for directed sums:
b c c
X 0 X 0 X 0
uk + uk = uk , for all a, b, c ∈ Z,
k=a k=b+1 k=a
Definition 1.1. The algebra of binomial sums over the field K, denoted B, is the
smallest subalgebra of S such that:
(a) The Kronecker delta sequence n ∈ Z 7→ δn , defined by δ0 = 1 and δn = 0
if n 6= 0, is in B.
(b) The geometric sequences n ∈ Z 7→ C n , for all C ∈ K \ {0}, are in B.
(c) The binomial sequence (n, k) 7→ nk (an element of S2 ) is in B.
(d) If λ : Zd → Ze is an affine map and if u ∈ B, then n ∈ Zd 7→ uλ(n) is in B.
¯ ¯
(e) If u ∈ B, then the following directed indefinite sum is in B:
m
X 0
(n, m) ∈ Zd × Z 7→ un,k .
¯ k=0
¯
By combining the rules (d) and (e) of the definition, we also obtain the closure
of B under sums whose bounds depend linearly on the parameter: if u ∈ B and if λ
and µ are affine maps : Zd → Z, then the sequence
µ(n)
X ¯ 0
(6) n ∈ Zd 7→ un,k
¯ ¯
k=λ(n)
¯
is a binomial sum.
See also Figure 1 for an example of a classical binomial sum.
k k k
j j j
3
k
j
(e)
m 3
n X 0 k
k j=0
j
n 7→ n + k (d) (d) m 7→ k
k 3
n n+k X 0 k
k k j
j=0
k 3
n n + k X0 k
k k j=0
j
(e)
m k 3
X 0 n n + k X0 k
δn
k k j=0
j
k=0
(e) (d) m 7→ n
n k 3
X 0 n n + k X0 k
Hn
k k j=0
j
k=0
n k 3
X n n + k X0 k
k k j=0
j
k=0
• The sequence of all prime integers is not a binomial sum because it does not
satisfy any nonzero linear recurrence relation with polynomial coefficients
(Flajolet et al. 2005), whereas every binomial sum does, see Corollary 3.6.
• The sequence (1/n)n>1 is not a binomial sum. To prove this, we can
easily reduce to the case where K is a number field and then study the
denominators that may appear in the elements of a binomial sum. One may
introduce new prime divisors in the denominators only by multiplying with
a scalar or with rule (b), so that the denominators of the elements of a given
binomial sum contain only finitely many prime divisors. This is clearly not
the case for the sequence (1/n)n>1 .
MULTIPLE BINOMIAL SUMS 9
By the same argument, the first sum of Eq. (1) is not a binomial sum. In-
deed, by creative telescoping, it can be shown to equal (2n + 1)4n+1 / 2n+2
n+1 +
1/3 and thus all prime numbers appear as denominators.
• The sequence (un )n>0 defined by u0 = 0, u1 = 1 and by the recurrence (2n +
1)un+2 − (7n + 11)un+1 + (2n + 1)un = 0 is not a binomial √ sum. This follows
√
from the asymptotic estimate
p un ∼ C · (4/(7 − 33)) · n 75/44 , with C ≈
n
0.56, and the fact that 75/44 is not a rational number (Garoufalidis 2009,
Theorem 5).
These criteria are, in substance, the only ones that we know to prove that
a given sequence is not a binomial sequence. Conjecturally, they characterize
univariate binomial sums. Indeed, we will see that the equivalence between univariate
binomial sums and diagonals of rational functions (Theorem 3.5) leads, among
many interesting corollaries, to the following reformulation of a conjecture due to
Christol (1990, Conjecture 4): “any sequence (un )n>0 of integers that grows at most
exponentially and that is solution of a linear recurrence equation with polynomial
coefficients is a binomial sum.”
2. Generating functions
To go back and forth between sequences and power series, one can use convergent
power series and Cauchy’s integrals to extract coefficients, as shown in the intro-
duction with Dixon’s identity, or one can use formal power series. Doing so, the
theory keeps close to the actual algorithms and we avoid the tedious tracking of
convergence radii. However, this requires the introduction of a field of multivariate
formal power series that makes it possible, by embedding the rational functions
into it, to define what the coefficient of a given monomial is in the power series
expansion of an arbitrary multivariate rational function. We choose here to use the
field of iterated Laurent series. It is an instance of the classical field of Hahn series
when the value group is Zn with the lexicographic order. We refer to Xin (2004) for
a complete treatment of this field and we simply gather here the main definitions
and results.
2.1. Iterated Laurent series. For a field A, let A((t)) be the field of univariate
formal Laurent power series with coefficients in A. For d > 0, let Ld be the field of
iterated formal Laurent power series K((zd ))((zd−1 )) · · · ((z1 )). It naturally contains
the field of rational functions in z1 , . . . , zd . For n = (n1 , . . . , nd ) ∈ Zd , let z ¯n
¯ ¯
denote the monomial z1n1 · · · zdnd , and for f ∈ Ld , let [z ¯n ]f denote the coefficient
n ¯ n
of z ¯n in f , that is the coefficient of zd d in the coefficient of zd−1 in [. . . ] in the
d−1
¯
coefficient of z1n1 of f . An element of f ∈ Ld is entirely characterized by its coefficient
function n ∈ Zd 7→ [z ¯n ]f . On occasion, we will write [z1n ]f , this means [z1n z20 · · · zd0 ]f ,
¯ ¯
e.g., [1]f means [z10 · · · zd0 ]f ; more generally we write [m]f , where m is a monomial.
In any case, the bracket notation always yields an element of K.
Let ≺ denote the lexicographic ordering on Zd . For n, m ∈ Zd we write z ¯n ≺ z m ¯
¯ ¯ ¯ ¯
if m ≺ n (mind the inversion: a monomial is larger when its exponent is smaller).
¯ ¯
In particular z1 ≺ · · · ≺ zd ≺ 1. With an analytic point of view, we work in an
infinitesimal region where zd is infinitesimally small and where zi is infinitesimally
small compared to zi+1 . The relation z ¯n ≺ z m n
¯ means that |z ¯ | is smaller than |z ¯ |
m
¯ ¯ ¯ ¯
in this region.
For f ∈ Ld , the support of f , denoted supp(f ), is the set of all n ∈ Zd such
¯
that [z ¯n ]f is not zero. It is well-known (e.g. Xin 2004, Prop. 2-1.2) that a function ϕ :
¯
10 A. BOSTAN, P. LAIREZ, AND B. SALVY
Theorem 2.2. Every binomial sum is a linear combination of finitely many se-
quences of the form n ∈ Zd 7→ [1] (R0 R1n1 · · · Rdnd ), where R0`d are rational functions
¯
of ordered variables z1`r , for some r ∈ N.
Proof. It is clear that δn = [1]z n , that C n = [1]C n and that nk = [1](1 + z)n z −k ,
for all n, k ∈ Z. Thus, it is enough to prove that the vector space generated by the
sequences of the form [1] (R0 R1n1 · · · Rdnd ) is a subalgebra of S which is closed by the
rules defining binomial sums, see §1.1.
0
First, it is closed under product: if R0`d and R0`d are rational functions in the
0
variables z1`r and z1`r0 respectively, then
d
! d
! d
!
0 ni
Y Y Y
ni 0 0 0 ni
[1] R0 Ri [1] R0 Ri = [1] R0 R0 (Ri Ri ) ,
i=1 i=1 i=1
0
with the ordering z1`r ≺ z1`r 0, for example. Then, to prove the closure under
change of variables, it is enough to reorder the factors:
d Pe !
d
! e d
!nj
Y aij nj +bi Y Y Y a
[1] R0 Ri j=1 = [1] R0 Ribi Ri ij .
i=1 i=1 j=1 i=1
Only the closure under partial sum remains. Let u be a sequence of the form
d
!
Y
d k ni
(n, k) ∈ Z × Z 7→ [1] T R0 Ri ,
¯ i=1
where T and R0`d are rational functions. If T = 1, then
m d
! d
!
X 0 Y (1 + v)R0
Y
un,k = [1] (m + 1)R0 Rini = [1] (1 + v)m Rini ,
¯
i=1
v i=1
k=0
Example 2. Following step by step the proof of Theorem 2.2, we obtain that
n n
(1 + z1 )(1 + z2 )2
X n n+k 1 + z2
= [1]
k k 1 + z1 − z1 z2 z1 z2
k=0
z1 z2 n
− [1] ((1 + z1 )(1 − z2 )) .
1 + z1 − z1 z2
We notice that the second term is always zero.
Corollary 2.3. For any binomial sum u : Zd → K, there exist r ∈ N and a rational
function R(t1`d , z1`r ), with t1`d ≺ z1`r , such that for any n ∈ Zd ,
( ¯
u n if n 1 , . . . , n d > 0,
[t¯n z¯0 ]R = ¯
¯ ¯ 0 otherwise.
Proof. It is enough to prove the claim for a generating set of the vector space of all
binomial sums. In accordance with Theorem 2.2, let u : Zd → K be a sequence of
the form n ∈ Zd 7→ [1] (S0 S1n1 · · · Sdnd ), where S0`d are rational functions of ordered
¯
variables z1`r . Let R(t1`d , z1`r ) be the rational function
d
Y 1
R = S0 .
i=1
1 − ti Si
Since the variables ti do not appear in the Si ’s, the coefficient in the sum is not zero
only if n = k. In particular, if n is not in Nd , then [t¯n z¯0 ]R = 0. And if n ∈ Nd , then
¯ ¯ ¯ ¯ ¯ ¯
[t¯n z¯0 ]R = [t¯n z¯0 ] (S0 · (t1 S1 )n1 · · · (td Sd )nd ) = [1] (S0 S1n1 · · · Sdnd ) = un ,
¯ ¯ ¯ ¯ ¯
which concludes the proof.
2.3. Residues. The notion of residue makes it possible to represent the full gen-
erating function of a binomial sum. It is a key step toward their computation.
For f ∈ Ld and 1 6 i 6 d, the formal residue of f with respect to zi , denoted reszi f ,
is the unique element of Ld such that
(
[z ¯n ](zi f ) if ni = 0,
[z ¯n ](res f ) = ¯
¯ zi 0 otherwise.
This is somehow the coefficient of 1/zi in f , considered as a power series in zi
(though f is not a Laurent series in zi since it may contain infinitely many negative
powers of zi ). When f is a rational function, care should be taken not to confuse the
formal residue with the classical residue at zi = 0, which is the coefficient of 1/zi in
the partial fraction decomposition of f with respect to zi . However, the former can
be expressed in terms of classical residues, see §5, and like the classical residues, it
vanishes on derivatives:
If α is a set of variables {zi1 , . . . , zir }, let resα f denote the iterated residue
reszi1 · · · reszir f . It is easily checked that this definition does not depend on the
MULTIPLE BINOMIAL SUMS 13
order in which the variables appear. This implies, together with Lemma 2.4, the
following lemma:
P
Lemma 2.5. resα v∈α ∂v fv = 0, for any family (fv )v∈α of elements of Ld .
Proof. resα∪β f g = resα resβ f g = resα f resβ g = resα f resβ g .
The order on the variables matters. For example, let F (x, y) be a rational
function, with x ≺ y. The residue resx F is a rational function of y. Indeed, if −n
is the exponent of x in lm(F ), which we assume to be negative, then
n−1
1 ∂ n
res F = x F .
x (n − 1)! ∂xn−1 x=0
In contrast, the residue with respect to y (or any other variable which is not the
smallest) is not, in general, a rational function. It is an important point because we
will represent generating series of binomial sums—which need be neither rational
nor algebraic—as residues of rational functions.
1
Example 3. Let F = xy(y2 +y−x) . Assume that y ≺ x, that is to say, we work in
the field K((x))((y)). We compute that resy F = − x12 because
1 (y + 1)
F =− 2
+ 2 2
x y x (y + y − x)
and the second term does not contain any negative power of y.
On the other hand, if we assume that x ≺ y, then resy F is not a rational function
anymore. Using Proposition 5.2, we can compute that
1 2 1
res F = − 2 + 2 1/2
= − + 3 − 10x + 35x2 + O(x3 ).
y x x + 4x − x(1 + 4x) x
Residues of rational functions can be used to represent any binomial sum; it is
the main point of the method and it is the last corollary of Theorem 2.2. Following
Egorychev we call them integral representations, or formal integral representations,
to emphasize the use of formal power series and residues rather than of analytic
objects.
Corollary 2.7 (Integral representations). For any binomial sum u : Zd → K, there
exist r ∈ N and a rational function R(t1`d , z1`r ), with t1`d ≺ z1`r , such that
X
un t¯n = res R.
¯¯ z1`r
n∈Nd
¯
In other words, the generating function of the restriction to Nd of a binomial sum
is a residue of a rational function.
Proof. By Corollary 2.3, there exist r ∈ N and a rational function R̃(t1`d , z1`r )
such that un = [t¯n z¯0 ]R̃ for all n ∈ Nd . Let R be R̃/(z1 · · · zr ). Then
¯ ¯ ¯ X ¯ X
un t¯n = [t¯n z¯0 ]R̃ t¯n = res R.
d
¯
d
¯ ¯ ¯ z1`r
n∈N n∈N
¯ ¯
14 A. BOSTAN, P. LAIREZ, AND B. SALVY
2.4. Algorithms. The proofs of Theorem 2.2 and its corollaries are constructive,
but in order to implement them, it is useful to consider not only sequences of
the form [1](R0 R¯n ) but also sequences of the form [1](nα n
¯ R0 R¯ ), for some rational
¯ d ¯ ¯
functions R0`d and α ∈ N . They bring two benefits. First, polynomial factors often
¯
appear in binomial sums and it is convenient to be able to represent them without
adding new variables. Second, we can always perform sums without adding new
variables, contrary to what is done in the case T = 1 of the proof of Theorem 2.2.
Lemma 2.8. For any A = 6 0 in some field k, and any α ∈ N, there exists a
polynomial P ∈ k[n] of degree at most α + 1 such that for all n ∈ Z,
nα An = P (n + 1)An+1 − P (n)An .
Algorithm 1 implements Theorem 2.2 in this generalized setting. The input data,
a binomial sum, is given as an expression considered as an abstract syntax tree, as
depicted in Figure 1. The implementation of Corollaries 2.3 and 2.7 must also be
adjusted to handle the monomials in n.
¯
MULTIPLE BINOMIAL SUMS 15
function SumToRes(u)
Xm
n1 nd
nα¯ Rk,0 Rk,1 · · · Rk,d ← SumToCT(u)
k
k=1
¯
m
1 X
return Rk,0 Fα1 (t1 Rk,1 ) · · · Fαd (td Rk,d )
z1 . . . zr
k=1
where F0 (z) = 1
1−z and Fα+1 (z) = zFα0 (z)
and r1`e such that |g(t1`d , z1`e )| 6 12 if |ti | 6 si and |zi | = ri . For example, we
can take si = exp(− exp(N/i)) and ri = exp(− exp(N/(d + i))), for some large
enough N , because
exp(− exp(N/i))p = o (exp(− exp(N/j))q ) , N → ∞,
for any p, q > 0 and i < j. On the one hand
ag k
X
res R = res ,
z1`e z1`e lm(f )
k>0
3. Diagonals
Let R(z1`d ) = n∈Nd an z ¯n be a rational power series in K(z1 , . . . , zd ). The
P
¯ ¯¯
diagonal of R is the univariate power series
def
X
diag R = an,...,n tn .
n>0
Theorem 3.1 (Christol 1985, Lipshitz 1988). Let R(z1`d ) be a rational power
series in K(z1 , . . . , zd ). There exist polynomials p0`r ∈ K[t], not all zero, such
that pr f (r) + · · · + p1 f 0 + p0 f = 0, where f = diag R.
We recall that a power series f ∈ KJtK is called algebraic if there exists a nonzero
polynomial P ∈ K[x, y] such that P (t, f ) = 0.
Theorem 3.2 (Furstenberg 1967). A power series f ∈ KJtK is algebraic if and only
if f is the diagonal of a bivariate rational power series.
Diagonals of rational power series in more than two variables need not be algebraic,
as shown by
X (3n)! 1
n
t = diag .
n!3 1 − z1 − z2 − z3
n>0
However, the situation is simpler modulo any prime number p. The following result
is stated by Furstenberg (1967, Theorem 1) over a field of finite characteristic;
since reduction modulo p and diagonal extraction commute, we obtain the following
statement:
MULTIPLE BINOMIAL SUMS 17
Theorem 3.3 (Furstenberg 1967). Let f ∈ QJtK be the diagonal of a rational power
series with rational coefficients. Finitely many primes may divide the denominator of
a coefficient of f . For all prime p except those, the power series f (mod p) ∈ Fp JtK
is algebraic.
Example 4. It is easy to check that the series f = n>0 (3n)! n
P
n!3 t satisfies
− 14
f ≡ (1 + t) mod 5,
1
2 −6
f ≡ 1 + 6t + 6t mod 7,
− 1
f ≡ 1 + 6t + 2t2 + 8t3 10 mod 11, etc.
un tn of a
P
Corollary 3.7 (Flajolet and Soria 1998). If the generating function n
sequence u : N → K is algebraic, then u is a binomial sum.
Corollary 3.8. Let u : N → Q be a binomial sum. Finitely many primes may
divide the denominators of values of u. For all primes p except those, the generating
function of a binomial sum is algebraic modulo p.
Moreover, Christol’s conjecture is equivalent to the following:
Conjecture 3.9. If an integer sequence u : N → Z grows at most exponentially
and satisfies a recurrence pr (n)un+r + · · · + p0 (n)un = 0, for some polynomials p0`r
with integer coefficients, not all zero, then u is a binomial sum.
The proof of Theorem 3.5 also gives information on binomial sums depending on
several indices, in the form of a converse of Corollary 2.3.
Proposition 3.10. A sequence Nd → K is a binomial sum if and only if there
exists a rational function R(t1`d , z1`r ), with t1`d ≺ z1`r , such that un = [t¯n z¯0 ]R
¯ ¯ ¯
for all n ∈ Zd .
¯
Sketch of the proof. The “only if” part is Corollary 2.3. Conversely, let R(t1`d , z1`r )
be a rational function and let un = [t¯n z¯0 ]R, for n ∈ Zd . We assume that un = 0
¯ ¯ ¯ ¯ ¯
if n ∈/ Nd . Using the same technique as in §3.1, we show that there exist a
¯
rational power series S(z1`d+r ) and monomials w1`d in the variables z1`d+r such
that un = [w¯n ]S. Then, with the same technique as in §3.3, we write un as a
¯ ¯ ¯
binomial sum.
In other words, binomial sums are exactly the constant terms of rational power
series, where the largest variables, for the order ≺, are eliminated.
3.1. Binomial sums as diagonals. Corollary 2.7 and Equation (7) provide an
expression of the generating function of a binomial sum (of one free variable) as the
diagonal of a rational Laurent series, but more is needed to obtain it as the diagonal
of a rational power series and obtain the “only if” part of Theorem 3.5.
Let u : N → K be a binomial sum. In this section, we aim at constructing a
rational power series S such that n>0 un tn = diag S. By Corollary 2.3, there
P
exists a rational function R̃(z0`r ) = fa such that un = [z0n z10 · · · zr0 ]R̃ for all n ∈ Z.
Recall the notation f ϕ , for f ∈ Lr+1 and ϕ an increasing endomorphism of Zr+1 ,
introduced in §2.1. For example, if f = z1 + z2 ∈ L2 and ϕ(n1 , n2 ) = (n1 , n1 + n2 )
then f ϕ = z1 z2 + z2 = z2 (1 + z1 ).
Lemma 3.11. For any polynomial f ∈ K[z0`r ] there exists an increasing endomor-
phism ϕ of Zr+1 such that f ϕ = C z m ¯ (1 + g), for some m ∈ N
r+1
, C ∈ K \ {0} and
¯ ¯
g ∈ K[z0`r ] with g(0, . . . , 0) = 0.
Proof. Let z¯a and z¯b be monomials of f such that z¯a ≺ z¯b . Let i be the smallest
¯ ¯ ¯ ¯
integer such that ai 6= bi . By definition ai > bi . For k ∈ N, let ϕk : Zr+1 → Zr+1
be defined by
ϕk : (n0 , . . . , nr ) ∈ Zr+1 7→ (n0 , . . . , ni , ni+1 + kni , . . . , nr + kni ) ∈ Zr+1 .
It is strictly increasing and if k is large enough then ϕk (a) > ϕk (b) componentwise,
¯ ¯
that is (z¯b )ϕk divides (z¯a )ϕk . We may apply repeatedly this argument to construct
¯ ¯
an increasing endomorphism ϕ of Zr+1 such that the leading monomial of f ϕ divides
all the monomials of f ϕ , which proves the Lemma.
MULTIPLE BINOMIAL SUMS 19
Let ϕ be the endomorphism given by the lemma above applied to the denominator
of R̃. For 0 6 0 6 r, let wi = ziϕ . Then
aϕ
R̃(w0`r ) = R̃ϕ = ,
C zm¯ (1 + g)
¯
because ·ϕ is a field morphism, as explained in §2.1. And by definition of R̃, we
aϕ
have un = [w0n ]R̃(w0`r ) for all n ∈ Z. Let R be the rational power series C(1+g) , so
n m
that un = [w0 ](R/z ¯ ). We now prove that we can reduce to the case where m = 0.
¯ ¯
If m 6= 0, let i be the smallest integer such that mi 6= 0. The specialization R|zi =0
¯
is a rational power series and R − R|zi =0 = zi T for some rational power series T .
For all n > 0, the coefficient of w0n in R|zi =0 /z m ¯ is zero because the exponent of zi
¯
in w0 is nonnegative while the exponent of zi in every monomial in R|zi =0 /z m
n
¯
T ¯
is −mi < 0. Thus un = [w0n ] zm ¯ /zi
, and we can replace R by T and subtract 1 to
the first nonzero coordinate ¯of m, which makes m decrease for the lexicographic
¯ ¯
ordering. Iterating this procedure leads to m = 0 and thus un = [w0n ]T for some
¯
rational power series T .
Let us write w0 as z0a0 · · · zrar , with a0`r ∈ Nr+1 . If all the ai ’s were equal to 1,
then n un tn would be the diagonal of T . First, we reduce to the case where all
P
where the εi ranges over the ai -th roots of unity. By construction, if m is a monomial
in the ziai , then [m]U = [m]T . In particular un = [w0n ]U .
We may consider T and U as elements of the extension of the field K(z0a0 , . . . , zrar )
by the roots of the polynomials X ai − zi , for 0 6 i 6 r. By construction,
the rational function U is left invariant by the automorphisms of this exten-
sion. Thus U ∈ K(z0a0 , . . . , zrar ). Let S(z0`r ) be the unique rational function
such that U = S(z0a0 , . . . , zrar ). It is a rational power series and un = [z0n · · · zrn ]S.
n
P
Thus n>0 un t = diag S, which concludes the proof that binomial sums are
diagonals of rational functions, the “only if” part of Theorem 3.5.
for a finite set Λ of linear maps Rd+e → R with integer coefficients in the canonical
bases. This section is dedicated to the proof of the following:
20 A. BOSTAN, P. LAIREZ, AND B. SALVY
After checking that for any a, b ∈ Z, Ha+b Ha−b = 1 if a > |b| and 0 otherwise,
we see that wni,+ = 1 if ni = |n|∞ and |nj | < |ni | for all j < i ; and 0 otherwise.
¯
Likewise, let wi,− be the sequence
i−1 d
def
Y Y
wni,− = H−ni −1 (H−ni −nj −1 H−ni +nj −1 ) (H−ni −nj H−ni +nj ),
¯
j=1 j=i+1
so that wni,− = 1 if ni = −|n|∞ < 0 and |nj | < |ni | for all j < i ; and 0 otherwise.
¯
The 2d sequences wi,+ and wi,− are binomial sums that partition 1: for all n ∈ Zd
¯
Xd Xd
1= wni,+ + wni,− .
¯ ¯
i=1 i=1
MULTIPLE BINOMIAL SUMS 21
d C(1−ni ) C(1−ni )
X X X
+ wni,− ··· un,m 1Γ (n, m),
i=1
¯ ¯ ¯ ¯ ¯
m1 =−C(1−ni ) me =−C(1−ni )
which concludes the proof of Proposition 3.12, because now the summation bounds
are affine functions with integer coefficients of n.
¯
From a practical point of view, summations over polyhedra can be handled in a
very different way, see §6.3.
3.3. Diagonals as binomial sums. We now prove the second part of Theorem 3.5:
the diagonal of a rational function is the generating function of a binomial sum.
Let R(z1`d ) be a rational power series and let us prove that the sequence defined
by un = [z1n · · · zdn ]R is a binomial sum. Since the binomial sums are closed under
linear combinations, it is enough to consider the case where the numerator of R is a
monomial and where the constant term of its denominator is 1. (It cannot be zero
since R is a power series.) Thus R has the form
z m0
R= P¯e ¯
,
ak z m
1+ ¯
k
k=1
¯
where the mk ’s have nonnegative coordinates and mk 6= 0 if k 6= 0. Let y0`e be new
¯ ¯
variables and let S be the rational power series
def y X k1 + · · · + ke
S(y0`e ) = Pe 0 = y0 ak11 · · · ake e y1k1 · · · yeke .
1 + k=1 ak yk k 1 , . . . , k e
k∈Ne |
¯
{z }
Ck
¯
The coefficient sequence Ck of this power series is a binomial sum because the
¯
multinomial coefficient is a product of binomial coefficients:
k1 + · · · + ke k1 + · · · + ke k2 + · · · + ke ke−1 + ke
= ··· .
k1 , . . . , k e k1 k2 ke−1
Let Γ ⊂ R × Re be the rational polyhedron defined by
n e o
def
X
Γ = (n, k) ∈ R × Re k1 > 0, . . . , ke > 0 and m0 + ki mi = (n, . . . , n) .
¯ ¯ i=1
¯
By construction R(z1`d ) = S(z ¯ , . . . , z ¯ ), and the image of a monomial y0 y1k1 · · · yeke
m0 me
¯ ¯
is a diagonal monomial z1n · · · zdn if and only if (n, k) ∈ Γ. Thus
X ¯
[z1n · · · zdn ]R = Ck 1Γ (n, k).
k∈Ze
¯ ¯
Thanks to the positivity conditions on the mk ’s, it is obvious that Γ satisfies the
¯
finiteness hypothesis of Proposition 3.12. Thus the sequence un is a binomial sum.
4.1. Picard-Fuchs equations. Let L be a field of characteristic zero and let R(z1`r )
be a rational function with coefficients in L, written as R = P F where P and F
are polynomials. Let AF be the localized ring L[z1`r , F −1 ]. It is known that
the L-linear quotient space
def
HF = AF / ∂z∂ 1 AF + · · · + ∂z∂ r AF
is finite-dimensional (Grothendieck 1966). Let us assume that there is a derivation ∂
defined on L. It extends naturally, with ∂zi = 0, to a derivation on AF that
∂
commutes with the derivations ∂z i
, so that ∂ defines a derivation on the L-linear
space HF . Since HF is finite-dimensional, there exist c0`m ∈ L, not all zero, such
that
cm ∂ m R + · · · + c1 ∂R + c0 R ∈ ∂z∂ 1 AF + · · · + ∂z∂ r AF .
Now let us assume that L is the field of rational functions K(t1`d ) and that ∂ is the
derivation ∂t∂ i for some i. Then the operator ∂ commutes with the operator resz1`r ,
as do the multiplications by elements of L, and Lemma 2.5 implies that
m
∂ ∂
cm ∂t m f + · · · + c1 ∂t f + c0 f = 0,
i i
where f = resz1`r R, with t1`d ≺ z1`r . Differential equations that arise in this way
are called Picard-Fuchs equations.
Recall that Ld is the field of iterated Laurent series introduced in §2.1. A
series f (t1`d ) ∈ Ld is called differentially finite if the K(t1`d )-linear subspace
MULTIPLE BINOMIAL SUMS 23
of Ld generated by the derivatives ∂ n1 +···+nd f /∂tn1 1 · · · ∂tnd d , for n1`d > 0, is finite-
dimensional. In particular, a univariate Laurent series f ∈ L1 is differentially finite
if and only if there exist m > 0 and polynomials p0`m ∈ K[t], not all zero, such
that pm f (m) + · · · + p1 f 0 + p0 f = 0. In that case, we say that f is solution of
a differential equation of order m and degree maxk deg pk . The above argument
implies the following classical theorem of which Lipshitz (1988) gave an elementary
proof.
Theorem 4.1. For any rational function R(t1`d , z1`r ) with t1`d ≺ z1`r , the
residue resz1`r R is differentially finite.
In previous work (Bostan et al. 2013a, Theorem 12; Lairez 2014, §I.35.3), we
proved the following quantitative result about the size of Picard-Fuchs equations
and the complexity of their computation. We also described an efficient algorithm
to compute Picard-Fuchs equations (Lairez 2016).
P
Theorem 4.2. Let R ∈ K(t, z1`r ) be a rational function, written as R = F , with P
and F polynomials. Let
N = max(degz1`r P + r + 1, degz1`r F ) and dt = max(degt P, degt F ).
Then resz1`r R, with t ≺ z1`r , is solution of a linear differential equation of order at
most N r and degree at most ( 58 N 3r + N r ) exp(r)dt . Moreover, this differential equa-
tion can be computed with O(exp(5r)N 8r dt ) arithmetic operations in K, uniformly
in all the parameters.
4.2. Power series solutions of differential equations. When a power series
satisfies a given linear differential equation with polynomial coefficients, one only
needs a few initial conditions to determine entirely the power series.
Let L ∈ K[t]h∂t i be a linear differential operator in ∂t with polynomial coefficients
in t. There exists a unique n ∈ Z and a unique bL ∈ K[a] such that L(ta ) =
bL (a)ta+n + o(ta+n ) for all a ∈ Z and t → 0. The polynomial bL is the indicial
polynomial of L at t = 0. For more details about the indicial polynomial, see
Ordinary Differential Equations (Ince 1944). It is easy to check that if f ∈ KJtK is
annihilated by L, then its leading monomial tn satisfies bL (n) = 0.
Proposition 4.3. Let f ∈ KJtK. If L(f ) = 0 and if [tn ]f = 0 for all n ∈ N such
that bL (n) = 0, then f = 0.
It is worth noting that the indicial equation of a Picard-Fuchs equation is very
special:
Theorem 4.4 (Katz 1970). If L is a Picard-Fuchs equation, then the degree of bL
equals the order of L and all the roots of bL are rational.
The data of a differential operator L and elements of K for each nonnegative
integer root of bL (that we will call here sufficient initial conditions) determines
entirely an element of KJtK. It is an excellent data structure for manipulating power
series (Salvy and Zimmermann 1994). For example, it lets one compute efficiently
the coefficients of the power series n un tn : the differential equation translates into
P
a recurrence relation
pr (n)un+r + . . . + p1 (n)un+1 + p0 (n)un = 0
for some polynomials p0`r ∈ K[n] and the sufficient initial conditions translate into
initial conditions for the recurrence, exactly where we need them.
24 A. BOSTAN, P. LAIREZ, AND B. SALVY
4.3. Equality test for univariate differentially finite power series. Let f ∈
KJtK be a power series given by a differential operator L ∈ K[t]h∂t i such that
L(f ) = 0, and by sufficient initial conditions. Let M be another differential
operator. We may decide if M(f ) = 0 in the following way. Firstly, we compute
the right g.c.d. of M and L: this is the operator D of the largest order such
that M = M0 D and L = L0 D for some operators M0 and L0 in K(t)h∂t i. Then, it
is enough to compute the indicial equation bL0 and to compute [tn ]D(f ) for each
nonnegative integer root n of bL0 . We will find only zeros if and only if M(f ) = 0.
Indeed, M(f ) = 0 if and only if D(f ) = 0 and since L0 (D(f )) = 0, we may apply
Proposition 4.3 to check whether D(f ) = 0 or not.
Now, let g ∈ KJtK be another power series given by a differential operator M ∈
K[t]h∂t i and sufficient initial conditions. To decide if f = g, it is enough to check
that M(f ) = 0, with the above method, and to check that the coefficients of f
and g corresponding to the nonnegative integer roots of bM are the same.
5. Geometric reduction
Putting into practice the computation of binomial sums through integral repre-
sentations shows immediately that the number of integration variables is high and
makes the computation of the Picard-Fuchs equations slow. However, the rational
functions obtained this way are very peculiar. For example, their denominator often
factors into small pieces. This section presents a sufficient condition under which
a residue resv F of a rational function F is rational. This leads to rewriting an
iterated residue of a rational function, like the ones given by Corollary 2.7, into
another one with one or several variables less. This simplification procedure is very
MULTIPLE BINOMIAL SUMS 25
efficient on the residues we are interested in and reduces the number of variables
significantly.
Conceptually the simplification procedure is simple: in terms of integrals it boils
down to computing partial integrals in specific cases where we know that they
are rational. The rational nature of a partial integral depends on the integration
cycle and integration algorithms usually forget about this cycle. Instead, they
compute the Picard-Fuchs equations—see §4.1—that annihilate a given integral
for any integration cycle. In our setting, the integration cycle underlies the notion
of residue—see §2.5. This provides a symbolic treatment that we call geometric
reduction since it takes into account the geometry of the cycle and decreases the
number of variables for which the general integration algorithm above is actually
needed. The time required by the computation is dramatically reduced by this
symbolic treatment.
5.1. Rational poles. Let us consider variables v and z1`d , where v can appear
anywhere in the variable ordering. Let F (v, z1`d ) = a/f be a rational function.
In general, resv F is not a rational function—except if v is the smallest variable,
see §2.3.
Let ρ ∈ Ld be a power series in the variables z1`d . The classical residue of F
at v = ρ, denoted Resv=ρ F , is the coefficient of 1/(v − ρ) in the partial fraction
decomposition of F as an element of Ld (v). Contrary to the formal residue resv F ,
the classical residue is always in the field generated by ρ and the coefficients of F .
Similarly to the formal residues, the classical residues of a derivative ∂G/∂v are all
zero.
Classical residues can be computed in a simple way: if ρ is not a pole of F ,
then Resv=ρ F = 0; if ρ is a pole of order 1, then Resv=ρ F = ((v − ρ)F ) |v=ρ ; and
if ρ is a pole of order r > 1, then
r−1
(v − ρ)r F
1 ∂
Res F = .
v=ρ (r − 1)! ∂ r−1 v v=ρ
In its simplest form, the geometric reduction applies when f factors over K(z1`d )
as a product of factors of degree 1:
Y
f = C(z1`d ) (v − ρ)nρ ,
ρ∈U
aρ
and resv v−ρ = aρ ; or lm(ρ) v, in which case
∞ n
aρ aρ X v
=− ,
v−ρ ρ n=0 ρ
a
ρ
hence resv v−ρ = 0. Since the variable v does not appear in ρ, the equality lm(ρ) = v
cannot happen. In the end, we obtain that
X
(9) res F = [lm(ρ) ≺ v] Res F,
v v=ρ
ρ∈U
where the bracket is 1 if the inequality inside is true and 0 otherwise. In particular,
the right-hand side is a rational function that we can compute.
Example 5. Let d > 0 be an integer and let us consider the binomial sum
n
X n dk
un = (−1)k .
k n
k=0
n
We will show that un = (−d) . This example is interesting because the geometric
reduction procedure alone is able to compute entirely the double integral representing
the generating function of u, whereas Zeilberger’s algorithm finds a recurrence
relation of order d − 1 (Paule and Schorn 1995), far from the minimal recurrence
relation un+1 + dun = 0.
Algorithm 1 computes that
X z2
un tn = res ,
z1 ,z2 (z2 − t(1 + z1 ))(z1 z2 + t(1 + z1 )(1 + z2 )d )
n>0
with t ≺ z1 ≺ z2 . Let F denote the rational function on the right-hand side. Each
factor of the denominator of F has degree 1 with respect to z1 . Thus Equation (9)
applies. The roots of the denominator are
z2 −1
ρ1 = − 1 and ρ2 = z2 ,
t 1 + t(1+z 2)
d
If d > 2, the denominator of the latter rational function does not split into factors
of degree 1 and Equation (9) does not apply. However, the study of nonrational
poles can lead to a further reduction.
5.2. Arbitrary poles. Equation (9) extends to the general case. To describe this
generalization, we need an algebraic closure of Ld . Let Ld,N be the field
def 1/N 1/N 1/N 1/N
Ld,N = K((zd ))((zd−1 )) . . . ((z2 ))((z1 )).
1/N
It is the algebraic extension of Ld generated by the zi . Let Ld,∞ be the union of
all Ld,N , N > 0, and let K ⊗K Ld,∞ be the compositum of Ld,∞ and K, where K is
an algebraic closure of K. The following is classical (e.g. Rayner 1974).
Lemma 5.1 (Iterated Puiseux theorem). The field K ⊗K Ld,∞ is an algebraic
closure of Ld .
The field K ⊗K Ld,∞ is thus simply denoted Ld . The valuation defined on Ld
is extended to a valuation defined on Ld with values in the group Qd , ordered
MULTIPLE BINOMIAL SUMS 27
where this time, the poles are in Ld . A root ρ is called small if ρ = 0 or lm(ρ) ≺ v
and large otherwise.
1
Example 6. Let F = xy(y 2 +y−x) , with x ≺ y. With respect to y, the poles of F
are 0, and √ √
1 1 + 4x 1 1 + 4x
ρ1 = − + and ρ2 = − − .
2 2 2 2
Only 0 and ρ1 are small. Thus
1 2
res F = Res F + Res F = − + √ .
y y=0 y=ρ1 x2 2
x + 4x − x 1 + 4x
Equation (10) does not look as interesting as Equation (9) because the right-hand
side is algebraic and need not be a rational function. However, if all roots are large,
then the residue is zero, which is interesting. On the contrary, if they are all small,
then resv F is the sum of all the classical residues of F , which equals the residue at
infinity:
def 1
res F = Res F = Res − 2 F |v←1/v ,
v v=∞ v=0 v
which is a rational function. Thus, in the case where the poles are either all small
or all large, Equation (10) shows that the residue resv F is rational and shows how
to compute it.
Actually it is enough to check that any two conjugate poles (two poles are
conjugate if they annihilate the same irreducible factor of the denominator of F )
Qr
are simultaneously large or small. Indeed, we can write f = k=1 fknk where f1`r
are irreducible polynomials in K(z1`d )[v], and the partial fraction decomposition
leads to
r
X ak
F =
fknk
k=1
for some polynomials a1`r . Equation (10) applies to each term of this sum. If Uk
denotes the set of all the roots of fk , then
r X
X ak
res F = [lm(ρ) ≺ v] Res nk ,
v v=ρ f
k=1 ρ∈Uk k
and we can apply the all large or all small criterion to each subsum separately.
Proposition 5.2. With the notations above, if for all k, there exists εk ∈ {0, 1}
such that [lm(ρ) ≺ v] = εk for all ρ ∈ Uk , then
r
X ak
res F = εk Res .
v v=∞ fknk
k=1
function AllLargeOrAllSmall(S, k)
if maxm∈S mk = minm∈S mk then return ∅
if k = 1 then return {out}
µ ← min
m∈S m1
M ← (m2`n ) ∈ Nd−1 m ∈ S and m1 = µ
r ← AllLargeOrAllSmall(M, k − 1)
if maxm∈S mk > maxm∈M mk then r ← r ∪ {out}
if minm∈S mk < minm∈M mk then r ← r ∪ {in}
return r
6. Optimizations
6.1. Infinite sums. So far, we have only considered binomial sums in which the
P
bounds of the symbols are finite and explicit. It is possible and desirable to
consider infinite sums, or more exactly syntactically infinite sums which in fact
reduce to finite sums but whose summation bounds are implicit. This often leads to
simpler integral representations.
Pn
For example, in the sum k=0 nk , the upper summation bound n is not really
P∞
useful when n > 0, we could as well write k=0 nk , which defines the same sequence.
It is possible to adapt Algorithm 1 to handle infinite sums as long as the underlying
summations in the field of iterated Laurent series are convergent. Recall that a
MULTIPLE BINOMIAL SUMS 29
function GeomRed(F Pr , k)
Decompose F as i=1 ai /fini +P (v) where the fi ’s are irreducible polynomials
in K[z1`d ] and a1`r , P ∈ K(z1`k−1 , zk+1`d )[zk ].
S←0
for i from 1 to r do
τ ← AllLargeOrAllSmall ({exponents of the monomials of fi }, k)
if τ ⊂ {in} then S ← Reszk =∞ (ai /fini )
if τ = {in, out} then return Fail
return S
geometric sum n>0 f n converges in the field Ld if and only if lm(f ) ≺ 1, see
P
Lemma 2.1.
To compute an integral representation of binomial sums involving infinite sum-
mations, the principle is to proceed as in §2.2 except when an infinite geometric
P
sum n>0 f in Ld shows up, where we check that lm(f ) ≺ 1 so that Lemma 2.1
applies. If it does, then the summation is performed and the computation continues.
If it does not, then the binomial sum is simply rejected.
P∞
sum un = k=0 nk , for n > 0. Note that
Example 8. Consider the binomial
Pn
Algorithm 1 applied to k=0 nk returns
n
z − z −n
X n
= [1] (1 + z)n .
k z−1
k=0
We proceed as in §2.2 except that infinite geometric sums in Ld are valid when
Lemma 2.1 applies. Firstly nk = [1](1 + z)n z −k . Then we consider the infinite
P∞
sum k=0 (1 + z)n z −k . Since 1/z 1, it does not converge, so the binomial sum is
P ∞ n
rejected. And indeed, when n < 0 the sum n=0 k has infinitely many non zero
n n
terms. If we change k into n−k , which is the same when n > 0, we obtain
∞ ∞ n n
X X 1 1 1 1
un = [1](1 + z)n z k−n−1 = [1] 1+ z k = [1] 1+ ,
z z z(1 − z) z
k=0 k=0
where this time the sum converges.
have found useful to have additional building blocks to extend Algorithms 1 and 2
that contruct integral representations. Without enlarging the class of binomial
sums, one can add any sequence of the form n 7→ [1]R0 R1n1 · · · Rdnd , where R0`d are
¯
rational functions, as a new building block. Judicious extra building blocks may
give simpler integral representations or speed up the computation. For example,
when working with Motzkin numbers
∞
def n−k n 2k + 2 2k + 2
X
Mn = (−1) − ,
k k+1 k+2
k=0
30 A. BOSTAN, P. LAIREZ, AND B. SALVY
k k k
n n n
n 0 n 00
n
(a) k (b) k
(c) k
for some rational functions R, T1`d and S1`e ∈ K(z1`r ). Then, with t1`e ≺ z1`d ,
X X
vn t¯n = [1]R 1Γ (n, m)(t1 T1 )n1 · · · (td Td )nd S1m1 · · · Seme
¯¯ ¯ ¯
d
n∈N d+e
(n,m)∈Z
¯ ¯ ¯
R · ϕΓ (t1 T1 , . . . , td Td , S1 , . . . , Sd )
= res ,
z1`r z1 · · · zd
provided that the sums converge in Ld+e . This method is interesting because it is
known how to compute efficiently compact representations of the rational function ϕΓ
(Barvinok 2008).
7. Applications
7.1. Andrews-Paule identity. We detail the proof of the following identity:
n X n 2 2
X i+j 4n − 2i − 2j 2n
(13) = (2n + 1) .
i=0 j=0
j 2n − 2i n
could have stuck to the former definition and used finite sums, but while the natural
binomials introduce two variables instead of one in the integral representation—see
Equation (11)—the integral representation obtained after the geometric reduction
step is often simpler when using the natural binomial.
So we obtain the following integral representation:
X
un tn = res (z2 z2 −t)(z4 z6 −z2 )(z3 z5 −z2 )(1−z
z1 z2
3 −z4 )(1−z5 −z6 )(1−z1 −z2 )
,
z1`6 1 2 1 2
n>0
Using the algorithm of Lairez (2016), we obtain (in about one second) a differential
operator annihilating n>0 un tn :
P
because the differential operator that we compute annihilates more that simply the
residue in which we ar interested: it annihilates every period of the integral of the
rational function inside the residue. Of course, this is not a issue as long as we do
obtain a differential equation.
Concerning the right-hand side, we find the integral representation
2
X 2n t + u2 (u2 − 1)u1 (u1 − 1)
(2n + 1) tn = res 2
,
n z 1 2 (t − u2 (u2 − 1)u1 (u1 − 1))
,z
n>0
ann. op.4 = t2 (t2 − 34t + 1)∂t3 + 3t(2t2 − 51t + 1)∂t2 + (7t2 − 112t + 1)∂t + t − 5
2Generating function of the left-hand side
3Generating function of the right-hand side
4Annihilating operator of both right and left-hand sides
MULTIPLE BINOMIAL SUMS 33
1
g.f.l.h.s = res
(1 − z1 )(1 − z2 )(1 − z3 )z1 z2 z3 + (z2 − z3 )(z1 − z3 )t
z1`3
1
g.f.r.h.s = res
z1`3 (1 − z1 )(1 − z2 )(1 − z3 )z1 z2 z3 + (1 − z1 − z2 )z3 t − (1 − z1 )(1 − z2 )t
1
g.f.l.h.s = g.f.r.h.s =
1 − 2t1 − t2
Here, the generating series is rational and geometric reduction performs the entire
computation, there is no need to compute a Picard-Fuchs equation.
2n 3
k 2n (3n)!
X
7.2.4. Dixon (1891). (−1) = (−1)n 3
k n!
k=0
(1 − z2 )(1 − z1 )z1 z2
g.f.l.h.s = res
z1`2 z12 z22 (1
− z2 )2 (1 − z1 )2 − (1 − z1 − z2 )2 t
1
g.f.r.h.s = res
z1`3 t + z1 z2 (1 − z1 − z2 )
1 (1 − t1 )(1 + t1 )
g.f.l.h.s = g.f.r.h.s =
2 t21 + 4t1 t2 + 2t1 + 1
Here again it is a rational power series and the geometric reduction finds it.
7.2.6. Davletshin et al. (2015, Theorem 1.2).
∞ nX 1 /2 X n1
X n 2 m − 1 m − 1
1+ 2q−1 +
q=1
q m=1
q − 1 m=1
q − 1
∞
X
q−1 n2 n1 bn1 /2c
= 2 +
q=1
q q q
34 A. BOSTAN, P. LAIREZ, AND B. SALVY
t1 t2 (1 + t1 − t2 − t1 t2 − 2t21 − 2t21 t2 )
g.f.l.h.s = g.f.r.h.s =
(1 − t2 )(1 − t1 )(1 − t2 − t21 t2 − t21 )(1 − t1 − t2 − t1 t2 )
The summation bound n1 /2 and the integer part bn1 /2c may look problematic,
until we observe that
n/2 X ∞
X m−1 m−1
= Hn−2m
m=1
q−1 m=1
q−1
X∞
bn/2c k
and = (δ2k−n + δ2k+1−n ) ,
q q
k=0
using the binomial sums δ and H defined in §1.
where we consider the binomial coefficient as defined in §1.1 and not one of the
variants of §6.2. This is an important clarification because negative values may
appear in the upper arguments of the binomial coefficients. The geometric reduction
is enough to prove this equality, no integration step is required.
7.3.1. Le Borgne’s identity. The following identity for Baxter’s numbers arises as a
conjecture in an unpublished work by Yvan Le Borgne. With the methods presented
here we can prove it automatically.
7.3.2. Identities from Brent et al. (2014). We have been able to prove the following
identities conjectured by Brent et al. (2014). The left-hand sides involve absolute
values of nonlinear polynomials. They are nevertheless binomial sums for two
reasons. The first one is that all the nonlinear polynomials under consideration
split into linear or positive factors. For example |i3 − j 3 | = |i − j|(i2 + ij + j 2 )
and |i − j| = (i − j)(Hi−j − Hj−i ) is a binomial sum.
The second reason, which we used for the computation, is that we can eliminate
the absolute values by using the symmetries of the sums. For example
X 2n 2n n X i−1
3 3
X 2n 2n
|i − j | = 4 i3 .
i,j
n + i n + j i=0 j=−i
n + i n + j
The integral representations obtained are too lengthy to be presented here, they
can be found online5. Since the right-hand sides are hypergeometric sequences, they
can be computed from the recurrence relations satisfied by the left-hand sides with
the algorithm of Petkovšek (1992).
X 2n 2n 2n2 (5n − 2) 4n
3 3
(Brent et al. 2014, Eq. 5.7) |i − j | =
i,j
n+i n+j 4n − 1 2n
(Brent et al.2014,
Eq. 5.8)
2n2 (43n3 − 70n2 + 36n − 6) 4n
X 2n
2n 5 5
|i − j | =
i,j
n+i n+j (4n − 1)(4n − 3) 2n
(Brentet al.
2014, Eq.5.9)
X 2n 2n 2n2 (531n5 −1960n4 +2800n3 −1952n2 +668n−90) 4n
|i7 − j 7 | = (4n−1)(4n−3)(4n−5)
i,j
n + i n + j 2n
5https://github.com/lairez/binomsums
36 A. BOSTAN, P. LAIREZ, AND B. SALVY
identity
n 3 3 ∞ ∞ 2 2
X n n+k X n n+k X k 2i 2i
= ,
k k k k i=0
i i k−i
k=0 k=0
the integral representation of the generating function of each side has five variables
and a parameter. For the left-hand side, we obtain
1
res .
z1`5 (z1 z3 z4 z5 +z2 z3 z4 z5 −z1 z2 z3 z4 z5 −z3 z4 z5 +z1 z2 )t+z1 z2 z3 z4 z5 (1−z1 )(1−z2 )(1−z3 )(1−z4 )(1−z5 )
The integral representation of the right-hand side is more complicated ant still has
five variables, in addition to the parameter. The computation requires several hours
with the current algorithms. Without the geometric reduction, it involves nine
variables and a parameter.
References
Abramov, S. A. (2006). “On the summation of P -recursive sequences”. In:
Proceedings of the international symposium on symbolic and algebraic
computation. ISSAC ’06. ACM Press, pp. 17–22. doi:
10.1145/1145768.1145779.
Abramov, S. A. and M. Petkovšek (1994). “D’Alembertian solutions of linear
differential and difference equations”. In: Proceedings of the international
symposium on symbolic and algebraic computation. ISSAC ’94. ACM Press,
pp. 169–174. doi: 10.1145/190347.190412.
– (2002). “On the structure of multivariate hypergeometric terms”. In: Advances in
Applied Mathematics 29.3, pp. 386–411. doi:
10.1016/S0196-8858(02)00022-2.
Abramov, S. A. and M. Petkovšek (2005). “Gosper’s algorithm, accurate
summation, and the discrete Newton-Leibniz formula”. In: Proceedings of the
international symposium on symbolic and algebraic computation. ISSAC ’05.
ACM Press, pp. 5–12. doi: 10.1145/1073884.1073888.
Allouche, J.-P. and M. Mendès France (2011). “Hadamard grade of power series”.
In: Journal of Number Theory 131.11, pp. 2013–2022. doi:
10.1016/j.jnt.2011.04.011.
Andrews, G. E. and P. Paule (1993). “Some questions concerning
computer-generated proofs of a binomial double-sum identity”. In: Journal of
Symbolic Computation 16.2, pp. 147–153. doi: 10.1006/jsco.1993.1038.
Apagodu, M. and D. Zeilberger (2006). “Multi-variable Zeilberger and
Almkvist-Zeilberger algorithms and the sharpening of Wilf-Zeilberger theory”.
In: Advances in Applied Mathematics 37.2, pp. 139–152. doi:
10.1016/j.aam.2005.09.003.
Barvinok, A. (2008). Integer points in polyhedra. Zurich Lectures in Advanced
Mathematics. European Mathematical Society (EMS), Zürich. doi:
10.4171/052.
Blodgett, R. J. (1990). “Problem E3376”. In: American Mathematical Monthly 97.3,
p. 240.
Bostan, A., P. Lairez, and B. Salvy (2013a). “Creative telescoping for rational
functions using the Griffiths-Dwork method”. In: Proceedings of the international
symposium on symbolic and algebraic computation. ISSAC ’13. ACM Press,
pp. 93–100. doi: 10.1145/2465506.2465935.
REFERENCES 37
Bostan, A., S. Boukraa, G. Christol, S. Hassani, and J.-M. Maillard (2013b). “Ising
n-fold integrals as diagonals of rational functions and integrality of series
expansions”. In: Journal of Physics. A. Mathematical and Theoretical 46.18,
pp. 185202, 44. doi: 10.1088/1751-8113/46/18/185202.
Brent, R. P., H. Ohtsuka, J.-A. H. Osborn, and H. Prodinger (2014). Some
binomial sums involving absolute values. arXiv: 1411.1477.
Brion, M. (1988). “Points entiers dans les polyèdres convexes”. In: Annales
Scientifiques de l’École Normale Supérieure. Quatrième Série 21.4, pp. 653–663.
Cameron, R. H. and W. T. Martin (1938). “Analytic continuation of diagonals and
Hadamard compositions of multiple power series”. In: Transactions of the
American Mathematical Society 44.1, pp. 1–7. doi: 10.2307/1990100.
Chapman, R. and R. Tauraso (2016). “Problem 11914”. In: American Mathematical
Monthly 123.5, p. 613.
Christol, G. (1985). “Diagonales de fractions rationnelles et équations de
Picard-Fuchs”. In: Study group on ultrametric analysis, 12th year, 1984/85, No.
1. Paris: Secrétariat Math., Exp. No. 13, 12.
– (1988). “Diagonales de fractions rationnelles”. In: Séminaire de Théorie des
Nombres, Paris 1986–87. Vol. 75. Progr. Math. Boston, MA: Birkhäuser Boston,
pp. 65–90.
– (1990). “Globally bounded solutions of differential equations”. In: Analytic
number theory (Tokyo, 1988). Vol. 1434. Lecture Notes in Math. Berlin:
Springer, pp. 45–64. doi: 10.1007/BFb0097124.
– (2015). “Diagonals of rational fractions”. In: Eur. Math. Soc. Newsl. 97,
pp. 37–43.
Chyzak, F. (2000). “An extension of Zeilberger’s fast algorithm to general
holonomic functions”. In: Discrete Mathematics 217.1-3. Formal power series and
algebraic combinatorics (Vienna, 1997), pp. 115–134. doi:
10.1016/S0012-365X(99)00259-9.
– (2014). The ABC of Creative Telescoping: Algorithms, Bounds, Complexity.
Mémoire d’habilitation à diriger les recherches.
Chyzak, F., A. Mahboubi, T. Sibut-Pinote, and E. Tassi (2014). “A
Computer-Algebra-Based Formal Proof of the Irrationality of ζ(3)”. In: 5th
International Conference on Interactive Theorem Proving. Vienna, Austria. doi:
10.1007/978-3-319-08970-6_11.
Cutkosky, S. D. (2004). Resolution of singularities. Vol. 63. Graduate Studies in
Mathematics. American Mathematical Society. doi: 10.1090/gsm/063.
Davletshin, M., G. Egorychev, and V. Krivokolesko (2015). New applications of the
Egorychev method of coefficients of integral representation and calculation of
combinatorial sums. arXiv: 1506.03596.
Dixon, A. C. (1891). “On the sum of the cubes of the coefficients in a certain
expansion by the binomial theorem”. In: Messenger of mathematics 20,
pp. 79–80.
Egorychev, G. P. (1984). Integral representation and the computation of
combinatorial sums. Vol. 59. Translations of Mathematical Monographs.
Translated from the Russian by H. H. McFadden, Translation edited by Lev J.
Leifman. Providence, RI: American Mathematical Society.
Egorychev, G. P. and E. V. Zima (2008). “Integral representation and algorithms
for closed form summation”. In: Handbook of algebra. Vol. 5. Vol. 5. Handb.
38 REFERENCES
(A. Bostan) Inria Saclay Île-de-France, Bâtiment Alan Turing, 1 rue Honoré d’Estienne
d’Orves, 91120 Palaiseau, France
E-mail address: [email protected]
(P. Lairez) Technische Universität Berlin, Fakultät II, Sekretariat 3-2, Straße des 17.
Juni 136, 10623 Berlin, Germany
E-mail address: [email protected]
(B. Salvy) Inria, LIP (U. Lyon, CNRS, ENS Lyon, UCBL), France
E-mail address: [email protected]