Summation of rational series twisted by strongly B-multiplicative coefficients

We evaluate in closed form series of the type $\sum u(n) R(n)$, where $(u(n))_n$ is a strongly $B$-multiplicative sequence and $R(n)$ a (well-chosen) rational function. A typical example is: $$ \sum_{n \geq 1} (-1)^{s_2(n)} \frac{4n+1}{2n(2n+1)(2n+2)} = -\frac{1}{4} $$ where $s_2(n)$ is the sum of the binary digits of the integer $n$. Furthermore closed formulas for series involving automatic sequences that are not strongly $B$-multiplicative, such as the regular paperfolding and Golay-Shapiro-Rudin sequences, are obtained; for example, for integer $d \geq 0$: $$ \sum_{n \geq 0} \frac{v(n)}{(n+1)^{2d+1}} = \frac{\pi^{2d+1} |E_{2d}|}{(2^{2d+2}-2)(2d)!} $$ where $(v(n))_n$ is the $\pm 1$ regular paperfolding sequence and $E_{2d}$ is an Euler number.


Introduction
The problem of evaluating a series n R(n) where R is a rational function with integer coefficients is classical: think of the values of the Riemann ζ function at integers.Such sums can also be "twisted", usually by a character (think of the L-functions), or by the usual arithmetic functions (e.g., the Möbius function µ).
Another possibility is to twist such sums by sequences related to the digits of n in some integer base.Examples can be found in [5] with, in particular, series u(n) n(n+1) , and in [7] with, in particular, series u(n) 2n(2n+1) (also see [9]): in both cases u(n) counts the number of occurrences of a given block of digits in the B-ary expansion of the integer n, or is equal to s B (n), the sum of the B-ary digits of the integer n (B being an integer 2).Two emblematic examples are (see [10,Problem B5,p. 682] and [12,5] for the first one, and [14,7] for the second one): where γ is the Euler-Mascheroni constant.
Similarly one can try to evaluate infinite products n R(n), where R(n) is a rational function, as well as twisted such products n R(n) u(n) , where the sequence (u(n)) n 0 is related to the digits of n in some integer base.An example can be found in [2] (also see [11] for the original problem): where z(n) is the sum of the number of 0's and the number of 1's in the binary expansion of n, i.e., the length of this expansion.Other examples can be found in [4], e.g., n 0 (4n + 2)(8n + 7)(8n + 3)(16n + 10) (4n + 3)(8n + 6)(8n + 2)(16n + 11) where u(n) = (−1) a(n) and a(n) is equal to the number of blocks 1010 occurring in the binary expansion of n.The products studied in [4] (also see references therein) are of the form n R(n) (−1) a(n) where R(n) is a (well-chosen) rational function with integer coefficients, and a(n) counts the number of occurrences of a given block of digits in the B-ary expansion of the integer n.The case where a(n) counts the number of 1's occurring in the binary expansion of n is nothing but the case a ) n 0 is strongly B-multiplicative: the more general evaluation of the product n R(n) u(n) where (u(n)) n 0 is a strongly B-multiplicative sequence, is addressed in [8] (also see [13]).Recall that a strongly B-multiplicative sequence (u(n)) n 0 satisfies u(0) = 0, and u(Bn + j) = u(n)u(j) for all j ∈ [0, B − 1] and all n 0. In particular, (u(n)) n 0 is B-regular (or even B-automatic if it takes only finitely many values): recall that a sequence (u(n)) n 0 is called B-automatic if its B-kernel, i.e., the set of subsequences {(u(B a n + r)) n 0 | a 0, 0 r B a − 1}, is finite; a sequence (u(n)) n 0 with values the electronic journal of combinatorics 22(1) (2015), #P1.59 in Z is called B-regular if the Z-module spanned by its B-kernel has finite type (for more on these notions, see, e.g., [6]).

Since log
, it is natural to look at "simpler" series of the form n u(n)R(n) with R and u as previously.All the examples above involve sequences (u(n)) n 0 that are B-regular or even B-automatic.Unfortunately we were not able to address the general case where (u(n)) n 0 is any B-regular or any B-automatic sequence.
The purpose of the present paper is to study the special case where, as in [8], the sequence u(n) is strongly B-multiplicative and R(n) is a well-chosen rational function.The paper can thus be seen as a companion paper to [8].We will end with the evaluation of similar series where (u(n)) n 0 is the regular paperfolding sequence or the Golay-Shapiro-Rudin sequence.

Preliminary definitions and results
This section quickly recalls definitions and results from [8].
Definition 1.Let B 2 be an integer.A sequence of complex numbers (u(n)) n 0 is strongly B-multiplicative if u(0) = 1 and, for all n 0 and all k ∈ {0, 1, . . ., B − 1}, Example 2. Let B 2 be an integer and s B (n) be the sum of the B-ary digits of n.Then for every complex number a = 0 the sequence (a s B (n) ) n 0 is strongly B-multiplicative.This sequence is B-regular (see the introduction); it is B-automatic if and only if a is a root of unity.
The following lemma is a variation of Lemma 1 in [8].
Lemma 3. Let B > 1 be an integer.Let (u(n)) n 0 be a strongly B-multiplicative sequence of complex numbers different from the sequence (1, 0, 0, . ..).We suppose that |u(n)| 1 for all n 0 and that | 0 k<B u(k)| < B. Let f be a map from the set of nonnegative integers to the set of complex numbers such that |f Lemma 1] to get the upper bound | 0 n<N u(n)| < CN α for some positive constant C and some real number α in (0, 1).Then use summation by parts.

Main results
We state in this section some basic identities as well as first applications and examples.First we define δ k , a special case of the Kronecker delta: the electronic journal of combinatorics 22(1) (2015), #P1.59 Theorem 4. Let B > 1 be an integer.Let (u(n)) n 0 be a strongly B-multiplicative sequence, and let f be a map from the nonnegative integers to the complex numbers, such that (u(n)) n 0 and f satisfy the conditions of Lemma 3. Define the series S 1 (k, B, u, f ), for k = 0, 1, . . ., B − 1, by Then the following linear relations hold: and In particular, define the series S 1 (k, B, u) and S 2 (k, B, u), for k = 0, 1, . . ., B − 1, by • Then the following linear relations hold: Proof.It follows from Lemma 3 that all the series in the theorem converge.To prove the first relation, we split n 0 u(n)f (n), obtaining To prove the second relation, we write To prove the last part of the theorem, we make two choices for f .First we take f defined by f (n) = 1/n for n = 0 and f (0) = 0. Then we take f (n) = 1/n(n + 1) if n = 0 and f (0) = 0.
Corollary 5.If (u(n)) n 0 is a strongly B-multiplicative sequence satisfying the conditions of Lemma 3, then • Proof.This follows from the last part of Theorem 4 by substitution and manipulation.
Recall that the nth harmonic number H n and the nth alternating harmonic number H * n are defined by is the number of occurrences of the digit j ∈ {0, 1, . . ., B − 1} in the B-ary expansion of n, then the following summations hold when j = 0: • Proof.It is not hard to see that, if j = 0, we can apply the last part of Theorem 4 to the sequence u(n) := (−1) N j,B (n) .Using Corollary 5 and the fact that N j,B (k) = δ k,j when 0 k < B, the result follows.
Example 7. Taking B = 2 and j = 1, we get the electronic journal of combinatorics 22(1) (2015), #P1.59 Subtracting the second equation from the first, we multiply by 4 and obtain n 1 With B = 3 and j = 1 we get and Proof.Setting u(n) := (−1) s B (n) , it is not hard to see that u(2n + 1) = −u(2n) for all n 0. (Hint: look at the cases B even and B odd separately.)It follows that (u(n)) n 0 satisfies the conditions of Lemma 3. Noting that u(k) = (−1) k when 0 k < B, the result follows from Corollary 5.
Example 9. Taking B = 2 or 3 gives the same pair of series as those with that value of B in Example 1, since and Example 10.We may let u(n) := i s 2 (n) in Corollary 5.This gives the two summations and by taking the imaginary and real parts we obtain the following result: If χ is the non-principal Dirichlet character modulo 4, defined by and and The paperfolding and Golay-Shapiro-Rudin sequences The results above involve sums u(n)R(n) where (u(n)) n 0 is a strongly B-multiplicative sequence, which, in all of our examples except Example 2 with alpha not a root of unity, happens to take only finitely many values.This implies that (u(n)) n 0 is B-automatic (see the introduction).One can then ask about more general sums u(n)R(n) where the sequence (u(n)) n 0 is B-automatic.We give two cases where such series can be summed.
Let R(n) be a function from the nonnegative integers to the complex numbers, such that ).Then we have the relation Proof.It is well known that | n<N r(n)| < K √ n for some positive constant K (actually more is known; see, e.g., [6, Theorem 3.3.2,p. 79] and the historical comments given in [6, 3.3, p. 121]).Thus, by summation by parts, the series n After exponentiating we obtain: n 0 (2n + 1) 2 (n + 1)(4n + 1) thus recovering the value of an infinite product obtained in [3, Theorem 2, p. 148] (also see [4]).