# Summation of rational series twisted by strongly B-multiplicative coefficients

Jean-Paul Allouche, Jonathan Sondow

<figure><img src="image_1.png" /></figure>

## To cite this version:

Jean-Paul Allouche, Jonathan Sondow. Summation of rational series twisted by strongly B-multiplicative coefficients. The Electronic Journal of Combinatorics, 2015, 22 (1), pp.1-59. hal-01263092

HAL Id: hal-01263092

https://hal.sorbonne-universite.fr/hal-01263092

Submitted on 27 Jan 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Summation of rational series twisted by strongly B-multiplicative coefficients

Jean-Paul Allouche*

CNRS, Institut de Mathématiques de Jussieu-PRG
Université Pierre et Marie Curie, Case 247
F-75252 Paris Cedex 05, France

jean-paul.allouche@imj-prg.fr

Jonathan Sondow

209 West 97th Street
New York
NY 10025, U.S.A

jsondow@alumni.princeton.edu

Submitted: Aug 26, 2014; Accepted: Feb 17, 2015; Published: Mar 6, 2015

Mathematics Subject Classifications: 11A63, 11B83, 11B85, 68R15, 05A19

## Abstract

We evaluate in closed form series of the type $\sum u(n)R(n)$, with $(u(n))_n$ a strongly B-multiplicative sequence and $R(n)$ a (well-chosen) rational function. A typical example is:

$$ \sum_{n \ge 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 \ge 0$:

$$ \sum_{n \ge 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.

**Keywords:** summation of series; strongly B-multiplicative sequences; paperfolding sequence; Golay-Shapiro-Rudin sequence

## 1 Introduction

The problem of evaluating a series $\sum_n R(n)$ where $R$ is a rational function with integer coefficients is classical: think of the values of the Riemann $\zeta$ function at integers. Such

<footnote>*The author was partially supported by the ANR project "FAN" (Fractals et Numération), ANR-12-IS01-0002.</footnote>
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 $\mu$).

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 $\sum \frac{u(n)}{n(n+1)}$, and in [7] with, in particular, series $\sum \frac{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 $\ge 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):

$$ \sum_{n \ge 1} \frac{s_B(n)}{n(n+1)} = \frac{B}{B-1} \quad \text{and} \quad \sum_{n \ge 1} \frac{s_2(n)}{2n(2n+1)} = \frac{\gamma + \log \frac{4}{\pi}}{2} $$

where $\gamma$ is the Euler-Mascheroni constant.

Similarly one can try to evaluate infinite products $\prod_n R(n)$, where $R(n)$ is a rational function, as well as twisted such products $\prod_n R(n)^{u(n)}$, where the sequence $(u(n))_{n \ge 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):

$$ \prod_{n \ge 1} \left( \frac{(4n + 2)(4n + 2)}{(4n + 1)(4n + 3)} \right)^{2z(n)} = \frac{4}{\pi} $$

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.,

$$ \prod_{n \ge 0} \left( \frac{(4n + 2)(8n + 7)(8n + 3)(16n + 10)}{(4n + 3)(8n + 6)(8n + 2)(16n + 11)} \right)^{u(n)} = \frac{1}{\sqrt{2}} $$

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 $\prod_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) = s_2(n)$. If $a(n) = s_B(n)$, the sequence $((-1)^{a(n)})_{n \ge 0}$ is strongly B-multiplicative: the more general evaluation of the product $\prod_n R(n)^{u(n)}$ where $(u(n))_{n \ge 0}$ is a strongly B-multiplicative sequence, is addressed in [8] (also see [13]). Recall that a strongly B-multiplicative sequence $(u(n))_{n \ge 0}$ satisfies $u(0) = 0$, and $u(Bn + j) = u(n)u(j)$ for all $j \in [0, B - 1]$ and all $n \ge 0$. In particular, $(u(n))_{n \ge 0}$ is B-regular (or even B-automatic if it takes only finitely many values): recall that a sequence $(u(n))_{n \ge 0}$ is called B-automatic if its B-kernel, i.e., the set of subsequences $\{(u(B^n n + r))_{n \ge 0} | a \ge 0, 0 \le r \le B^a - 1\}$, is finite; a sequence $(u(n))_{n \ge 0}$ with values
in $\mathbb{Z}$ is called B-regular if the $\mathbb{Z}$-module spanned by its B-kernel has finite type (for more on these notions, see, e.g., [6]).

Since $\log \prod_n R(n)^{u(n)} = \sum_n u(n) \log R(n)$, it is natural to look at “simpler” series of the form $\sum_n u(n)R(n)$ with $R$ and $u$ as previously. All the examples above involve sequences $(u(n))_{n \ge 0}$ that are B-regular or even B-automatic. Unfortunately we were not able to address the general case where $(u(n))_{n \ge 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 \ge 0}$ is the regular paperfolding sequence or the Golay-Shapiro-Rudin sequence.

## 2 Preliminary definitions and results

This section quickly recalls definitions and results from [8].

**Definition 1.** Let $B \ge 2$ be an integer. A sequence of complex numbers $(u(n))_{n \ge 0}$ is strongly B-multiplicative if $u(0) = 1$ and, for all $n \ge 0$ and all $k \in \{0, 1, \dots, B-1\}$,

$$u(Bn + k) = u(n)u(k).$$

**Example 2.** Let $B \ge 2$ be an integer and $s_B(n)$ be the sum of the B-ary digits of $n$. Then for every complex number $a \ne 0$ the sequence $(a^{s_B(n)})_{n \ge 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 \ge 0}$ be a strongly B-multiplicative sequence of complex numbers different from the sequence $(1, 0, 0, \dots)$. We suppose that $|u(n)| \le 1$ for all $n \ge 0$ and that $|\sum_{0 \le 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(n+1) - f(n)| = O(n^{-2})$. Then the series $\sum_{n \ge 0} u(n)f(n)$ is convergent.

*Proof.* Use [8, Lemma 1] to get the upper bound $|\sum_{0 \le n < N} u(n)| < CN^\alpha$ for some positive constant $C$ and some real number $\alpha$ in $(0, 1)$. Then use summation by parts. $\square$

## 3 Main results

We state in this section some basic identities as well as first applications and examples. First we define $\delta_k$, a special case of the Kronecker delta:

$$\delta_k = \begin{cases} 1 & \text{if } k = 0, \\ 0 & \text{otherwise.} \end{cases}$$
**Theorem 4.** Let $B > 1$ be an integer. Let $(u(n))_{n \ge 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 \ge 0}$ and $f$ satisfy the conditions of Lemma 3. Define the series $S_1(k, B, u, f)$, for $k = 0, 1, \dots, B - 1$, by

$$S(k, B, u, f) := \sum_{n \ge 0} u(n) f(Bn + k).$$

Then the following linear relations hold:

$$\sum_{n \ge 0} u(n) f(n) = \sum_{0 \le k \le B-1} u(k) S(k, B, u, f)$$

and

$$\sum_{n \ge 0} u(n) \sum_{0 \le k \le B-1} f(Bn + k) = \sum_{0 \le k \le B-1} S(k, B, u, f).$$

In particular, define the series $S_1(k, B, u)$ and $S_2(k, B, u)$, for $k = 0, 1, \dots, B - 1$, by

$$S_1(k, B, u) := \sum_{n \ge \delta_k} \frac{u(n)}{Bn + k} \quad \text{and} \quad S_2(k, B, u) := \sum_{n \ge \delta_k} \frac{u(n)}{(Bn + k)(Bn + k + 1)}.$$

Then the following linear relations hold:

$$(B-1)S_1(0, B, u) - \sum_{1 \le k \le B-1} u(k)S_1(k, B, u) = 0$$

and

$$\sum_{0 \le k \le B-1} (B - u(k))S_2(k, B, u) = B - 1.$$

*Proof.* It follows from Lemma 3 that all the series in the theorem converge. To prove the first relation, we split $\sum_{n \ge 0} u(n)f(n)$, obtaining

$$\sum_{n \ge 0} u(n) f(n) = \sum_{0 \le k \le B-1} \sum_{n \ge 0} u(Bn + k) f(Bn + k) = \sum_{0 \le k \le B-1} \sum_{n \ge 0} u(n) u(k) f(Bn + k) \\ = \sum_{0 \le k \le B-1} u(k) \sum_{n \ge 0} u(n) f(Bn + k) = \sum_{0 \le k \le B-1} u(k) S(k, B, u, f).$$

To prove the second relation, we write

$$\sum_{n \ge 0} u(n) \sum_{0 \le k \le B-1} f(Bn + k) = \sum_{0 \le k \le B-1} \sum_{n \ge 0} u(n) f(Bn + k) = \sum_{0 \le k \le B-1} S(k, B, u, f).$$

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 \ne 0$ and $f(0) = 0$. Then we take $f(n) = 1/n(n + 1)$ if $n \ne 0$ and $f(0) = 0$. $\square$
**Remark** The formula $S_2(k, B, u) = S_1(k, B, u) - (S_1(k+1, B, u) - \delta_k)$ ($0 \le k \le B-2$) holds. Nevertheless, the last two relations in Theorem 4 are independent, because $S_2(B-1, B, u)$ cannot be expressed in terms of the $S_1(k, B, u)$ for $k = 0, 1, \dots, B-1$.

**Corollary 5.** If $(u(n))_{n \ge 0}$ is a strongly B-multiplicative sequence satisfying the conditions of Lemma 3, then

$$ \sum_{n \ge 1} u(n) \sum_{1 \le k \le B-1} \left( \frac{1}{Bn} - \frac{u(k)}{Bn+k} \right) = \sum_{1 \le k \le B-1} \frac{u(k)}{k} $$

and

$$ \sum_{n \ge 1} u(n) \sum_{0 \le k \le B-1} \frac{B - u(k)}{(Bn + k)(Bn + k + 1)} = \sum_{1 \le k \le B-1} \frac{u(k)}{k(k+1)}. $$

*Proof.* This follows from the last part of Theorem 4 by substitution and manipulation. $\square$

Recall that the $n$th harmonic number $H_n$ and the $n$th alternating harmonic number $H_n^*$ are defined by

$$ H_n := \sum_{1 \le k \le n} \frac{1}{k} \quad \text{and} \quad H_n^* := \sum_{1 \le k \le n} \frac{(-1)^{k-1}}{k}. $$

**Corollary 6.** If $N_{j,B}(n)$ is the number of occurrences of the digit $j \in \{0, 1, \dots, B-1\}$ in the B-ary expansion of $n$, then the following summations hold when $j \ne 0$:

$$ \sum_{n \ge 1} (-1)^{N_{j,B}(n)} \left( \frac{2}{Bn + j} + \frac{1}{Bn} \sum_{1 \le k \le B-1} \frac{k}{Bn + k} \right) = H_{B-1} - \frac{2}{j} $$

and

$$ \sum_{n \ge 1} (-1)^{N_{j,B}(n)} \left( \frac{B-1}{n(n+1)} + \frac{2B}{(Bn+j)(Bn+j+1)} \right) = B - 1 - \frac{2B}{j(j+1)}. $$

*Proof.* It is not hard to see that, if $j \ne 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) = \delta_{k,j}$ when $0 \le k < B$, the result follows. $\square$

**Example 7.** Taking $B=2$ and $j=1$, we get

$$ \sum_{n \ge 1} (-1)^{N_{1,2}(n)} \frac{4n+1}{2n(2n+1)} = -1 $$

and

$$ \sum_{n \ge 1} (-1)^{N_{1,2}(n)} \frac{4n+1}{2n(2n+1)(2n+2)} = -\frac{1}{4}. $$
Subtracting the second equation from the first, we multiply by 4 and obtain

$$ \sum_{n \ge 1} (-1)^{N_{1,2}(n)} \frac{4n+1}{n(n+1)} = -3. $$

With $B = 3$ and $j = 1$ we get

$$ \sum_{n \ge 1} (-1)^{N_{1,3}(n)} \frac{18n^2 + 21n + 4}{3n(3n+1)(3n+2)} = -\frac{1}{2} $$

and

$$ \sum_{n \ge 1} (-1)^{N_{1,3}(n)} \frac{6n^2 + 6n + 1}{3n(3n+1)(3n+2)(3n+3)} = -\frac{1}{36}. $$

**Corollary 8.** If $s_B(n)$ is the sum of the B-ary digits of $n$, then

$$ \sum_{n \ge 1} (-1)^{s_B(n)} \sum_{1 \le k \le B-1} \left( \frac{1}{Bn} - \frac{(-1)^k}{Bn+k} \right) = -H_{B-1}^* $$

and

$$ \sum_{n \ge 1} (-1)^{s_B(n)} \sum_{0 \le k \le B-1} \frac{B - (-1)^k}{(Bn + k)(Bn + k + 1)} = 1 + \frac{(-1)^B}{B} - 2H_{B-1}^*. $$

*Proof.* Setting $u(n) := (-1)^{s_B(n)}$, it is not hard to see that $u(2n + 1) = -u(2n)$ for all $n \ge 0$. (Hint: look at the cases $B$ even and $B$ odd separately.) It follows that $(u(n))_{n \ge 0}$ satisfies the conditions of Lemma 3. Noting that $u(k) = (-1)^k$ when $0 \le k < B$, the result follows from Corollary 5. $\square$

**Example 9.** Taking $B = 2$ or $3$ gives the same pair of series as those with that value of $B$ in Example 1, since $s_2(n) = N_{1,2}(n)$ and $s_3(n) = N_{1,3}(n) + 2N_{2,3}(n)$. (We can also replace $s_3(n)$ with $n$, as $(-1)^{s_B(n)} = (-1)^n$ when $B$ is odd.) With $B = 4$ we get

$$ \sum_{n \ge 1} (-1)^{s_4(n)} \frac{128n^3 + 176n^2 + 76n + 9}{4n(4n+1)(4n+2)(4n+3)} = -\frac{5}{12} $$

and

$$ \sum_{n \ge 1} (-1)^{s_4(n)} \frac{128n^3 + 184n^2 + 80n + 9}{4n(4n+1)(4n+2)(4n+3)(4n+4)} = -\frac{5}{12}. $$

# 4 More examples

Using Corollary 5 with sequences $(u(n))_{n \ge 0}$ taking complex values yields other examples of sums of series.
**Example 10.** We may let $u(n) := i^{s_2(n)}$ in Corollary 5. This gives the two summations

$$ \sum_{n \ge 1} \left( \frac{i^{s_2(n)}}{2n} - \frac{i^{s_2(n)+1}}{2n+1} \right) = i = \sum_{n \ge 1} \frac{i^{s_2(n)}(3n+1) - i^{s_2(n)+1}n}{n(n+1)(2n+1)}, $$

and by taking the imaginary and real parts we obtain the following result:

If $\chi$ is the non-principal Dirichlet character modulo 4, defined by

$$ \chi(n) := \begin{cases} +1 & \text{if } n \equiv 1 \bmod 4, \\ -1 & \text{if } n \equiv 3 \bmod 4, \\ 0 & \text{otherwise,} \end{cases} $$

then

$$ \sum_{n \ge 1} \left( \frac{\chi(s_2(n))}{2n} - \frac{\chi(s_2(n) + 1)}{2n + 1} \right) = 1 = \sum_{n \ge 1} \frac{(3n + 1)\chi(s_2(n)) - n\chi(s_2(n) + 1)}{n(n + 1)(2n + 1)} $$

and

$$ \sum_{n \ge 1} \left( \frac{\chi(s_2(n) + 1)}{2n} - \frac{\chi(s_2(n) + 2)}{2n + 1} \right) = 0 = \sum_{n \ge 1} \frac{(3n + 1)\chi(s_2(n) + 1) - n\chi(s_2(n) + 2)}{n(n + 1)(2n + 1)}. $$

**Example 11.** Generalizing Example 10 by replacing $i^{s_2(n)}$ with $e^{2i\pi s_2(n)/d}$, for integer $d \ge 2$, is straightforward, yielding the following summations (Example 10 is another formulation for the case $d = 4$):

$$ \sum_{n \ge 1} \left( \frac{\sin \frac{2\pi s_2(n)}{d}}{2n} - \frac{\sin \frac{2\pi(s_2(n)+1)}{d}}{2n+1} \right) = \sin \frac{2\pi}{d} = \sum_{n \ge 1} \frac{(3n+1)\sin \frac{2\pi s_2(n)}{d} - n\sin \frac{2\pi(s_2(n)+1)}{d}}{n(n+1)(2n+1)} $$

and

$$ \sum_{n \ge 1} \left( \frac{\cos \frac{2\pi s_2(n)}{d}}{2n} - \frac{\cos \frac{2\pi(s_2(n)+1)}{d}}{2n+1} \right) = \cos \frac{2\pi}{d} = \sum_{n \ge 1} \frac{(3n+1)\cos \frac{2\pi s_2(n)}{d} - n\cos \frac{2\pi(s_2(n)+1)}{d}}{n(n+1)(2n+1)}. $$

# 5 The paperfolding and Golay-Shapiro-Rudin sequences

The results above involve sums $\sum u(n)R(n)$ where $(u(n))_{n \ge 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 \ge 0}$ is B-automatic (see the introduction). One can then ask about more general sums $\sum u(n)R(n)$ where the sequence $(u(n))_{n \ge 0}$ is B-automatic. We give two cases where such series can be summed.
**Theorem 12.** Let $(v(n))_{n \ge 0}$ be the regular paperfolding sequence. Its first few terms are given by (replacing +1 by + and -1 by -)

$$ (v(n))_{n \ge 0} = + + - + + - - \dots; $$

it can be defined by: $v(2n) = (-1)^n$ and $v(2n + 1) = v(n)$ for all $n \ge 0$. Then, for all integers $d \ge 0$, we have the relation

$$ \sum_{n \ge 0} \frac{v(n)}{(n+1)^{2d+1}} = \frac{\pi^{2d+1} |E_{2d}|}{(2^{2d+2} - 2)(2d)!} $$

where the $E_{2d}$'s are the Euler numbers defined by:

$$ \frac{1}{\cosh t} = \sum_{n \ge 0} \frac{E_{2n}}{(2n)!} t^{2n} \text{ for } |t| < \frac{\pi}{2}. $$

*Proof.* First note that the series $\sum_{n \ge 0} \frac{v(n)}{(n+1)^s}$ converges for $\Re(s) > 0$: use the inequality $|\sum_{n<N} v(n)| = O(\log N)$ (see, e.g., [6, Exercise 28, p. 206]) and summation by parts; note that the sequence $(R_n)_{n \ge 1}$ in [6, Exercise 28, p. 206] is equal to the sequence $(v(n))_{n \ge 0}$ here. Now, Exercise 27 in [6, p. 205–206] asks to prove, for all complex numbers $s$ with $\Re(s) > 0$, the equality (again with slightly different notation)

$$ \sum_{n \ge 0} \frac{v(n)}{(n+1)^s} = \frac{2^s}{2^s-1} \sum_{n \ge 0} \frac{(-1)^n}{(2n+1)^s}. $$

This can be easily done by splitting the sum on the left into even and odd indexes. Recalling that the Dirichlet beta function is defined by $\beta(s) = \sum_{n \ge 0} \frac{(-1)^n}{(2n+1)^s}$ for $\Re(s) > 0$, we thus have, for any nonnegative integer $d$,

$$ \sum_{n \ge 0} \frac{v(n)}{(n+1)^{2d+1}} = \frac{2^{2d+1}}{2^{2d+1}-1} \beta(2d+1). $$

But, when $s$ is an odd integer, the value of $\beta(s)$ can be expressed as a rational multiple of $\pi$ (see, e.g., [1, 23.2.22, p. 807]):

$$ \beta(2d+1) = \frac{(\pi/2)^{2d+1}}{2(2d)!} |E_{2d}|. \quad \square $$

**Example 13.** Taking $d = 0$ in Theorem 12 yields a result due to F. von Haeseler (see [6, Exercise 27, p. 205–206])

$$ \sum_{n \ge 0} \frac{v(n)}{n+1} = \frac{\pi}{2}. $$

The second result we give in this section involves the Golay-Shapiro-Rudin sequence.
**Theorem 14.** Let $(r(n))_{n \ge 0}$ be the $\pm 1$ Golay-Shapiro-Rudin sequence. This sequence can be defined by $r(n) = (-1)^{a(n)}$, where $a(n)$ is the number of possibly overlapping occurrences of the block 11 in the binary expansion of $n$, so that (replacing +1 by + and -1 by -1)

$$ (r(n))_{n \ge 0} = + + + - + + - + \dots; $$

alternatively it can be defined by

$$ r(0) = 1, \text{ and } r(2n) = r(n), \ r(2n + 1) = (-1)^n r(n) \text{ for } n \ge 0. $$

Let $R(n)$ be a function from the nonnegative integers to the complex numbers, such that $|R(n+1) - R(n)| = O(n^{-2})$. Then we have the relation

$$ \sum_{n \ge 1} r(n)(R(n) - R(2n) + R(2n+1) - 2R(4n+1)) = R(1). $$

*Proof.* It is well known that $|\sum_{n<N} r(n)| < K\sqrt{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 $\sum_{n \ge 0} r(n)R(n)$ is convergent. Now we write

$$ \begin{aligned} \sum_{n \ge 0} r(n)R(n) &= \sum_{n \ge 0} r(2n)R(2n) + \sum_{n \ge 0} r(2n+1)R(2n+1) \\ &= \sum_{n \ge 0} r(n)R(2n) + \sum_{n \ge 0} (-1)^n r(n)R(2n+1) \\ &= \sum_{n \ge 0} r(n)R(2n) + \sum_{n \ge 0} r(2n)R(4n+1) - \sum_{n \ge 0} r(2n+1)R(4n+3) \\ &= \sum_{n \ge 0} r(n)(R(2n) + R(4n+1)) - \sum_{n \ge 0} r(2n+1)R(4n+3). \end{aligned} $$

Hence

$$ \begin{aligned} \sum_{n \ge 0} r(n)(R(n) - R(2n) - R(4n+1)) &= - \sum_{n \ge 0} r(2n+1)R(4n+3) \\ &= - \left( \sum_{n \ge 0} r(n)R(2n+1) - \sum_{n \ge 0} r(2n)R(4n+1) \right) \\ &= - \sum_{n \ge 0} r(n)R(2n+1) + \sum_{n \ge 0} r(n)R(4n+1) \end{aligned} $$

where the penultimate equality is obtained by splitting the sum $\sum_{n \ge 0} r(n)R(2n+1)$ into even and odd indices. Thus, finally

$$ \sum_{n \ge 0} r(n)(R(n) - R(2n) + R(2n+1) - 2R(4n+1)) = 0, $$

hence

$$ \sum_{n \ge 1} r(n)(R(n) - R(2n) + R(2n+1) - 2R(4n+1)) = R(1). \quad \square $$
**Example 15.** Taking $R(n) = 1/n$ if $n \neq 0$ and $R(0) = 1$ in Theorem 14 above yields

$$ \sum_{n \geq 1} r(n) \frac{8n^2 + 4n + 1}{2n(2n + 1)(4n + 1)} = 1. $$

**Example 16.** Taking $R$ defined by $R(n) = \log n - \log(n + 1)$ for $n \neq 0$ and $R(0) = 0$ in Theorem 14 above yields

$$ \sum_{n \geq 1} r(n) \log \frac{(2n + 1)^4}{(n + 1)^2 (4n + 1)^2} = -\log 2. $$

Hence

$$ \sum_{n \geq 0} r(n) \log \frac{(2n + 1)^2}{(n + 1)(4n + 1)} = -\frac{1}{2} \log 2. $$

After exponentiating we obtain:

$$ \prod_{n \geq 0} \left( \frac{(2n + 1)^2}{(n + 1)(4n + 1)} \right)^{r(n)} = \frac{1}{\sqrt{2}} $$

thus recovering the value of an infinite product obtained in [3, Theorem 2, p. 148] (also see [4]).

## References

[1] M. Abramowitz and I. A. Stegun. *Handbook of Mathematical Functions With Formulas, Graphs, and Mathematical Tables*, National Bureau of Standards Applied Mathematics Series, no 55, 10th printing, 1972.

[2] J.-P. Allouche. On a formula of T. Rivoal. *Ann. Univ. Sci. Budapest. Sect. Comput.*, 40:69–79, 2013.

[3] J.-P. Allouche, H. Cohen, M. Mendès France, and J. O. Shallit. De nouveaux curieux produits infinis. *Acta Arith.*, 49:141–153, 1987.

[4] J.-P. Allouche and J. O. Shallit. Infinite products associated with counting blocks in binary strings. *J. London Math. Soc.*, 39:193–204, 1989.

[5] J.-P. Allouche and J. Shallit. Sums of digits and the Hurwitz zeta function. In *Analytic number theory (Tokyo, 1988)*, volume 1434 of *Lecture Notes in Math.*, pages 19–30. Springer, Berlin, 1990.

[6] J.-P. Allouche and J. Shallit. *Automatic Sequences. Theory, Applications, Generalizations*. Cambridge University Press, Cambridge, 2003.

[7] J.-P. Allouche, J. Shallit, and J. Sondow. Summation of series defined by counting blocks of digits. *J. Number Theory*, 123:133–143, 2007.
[8] J.-P. Allouche and J. Sondow. Infinite products with strongly B-multiplicative exponents. *Ann. Univ. Sci. Budapest. Sect. Comput.*, 28:35–53, 2008.
Also see J.-P. Allouche and J. Sondow. Errata for the paper J.-P. Allouche and J. Sondow: Infinite products with strongly B-multiplicative exponents. *Ann. Univ. Sci. Budapest. Sect. Comput.*, 32:253, 2010.

[9] K. Hessami Pilehrood and T. Hessami Pilehrood. Vacca-type series for values of the generalized Euler constant function and its derivative. *J. Integer Seq.* 13(7):Article 10.7.3, 21 pp., 2010.

[10] L. F. Klosinski, G. L. Alexanderson, and A. P. Hillman. The William Lowell Putnam mathematical competition. *Amer. Math. Monthly*, 89:679–686, 1982.

[11] T. Rivoal. Polynômes de type Legendre et approximations de la constante d'Euler. *Unpublished preprint* (2005). http://www-fourier.ujf-grenoble.fr/~rivoal/articles/euler.pdf

[12] J. O. Shallit. Two series, solution to Advanced Problem 6450 in Amer. Math. Monthly **91** (1984) 59–60. *Amer. Math. Monthly*, 92:513–514, 1985.

[13] J. Sondow. An infinite product based on a base, solution to Problem 11222 in Amer. Math. Monthly 113 (2006) 459. *Amer. Math. Monthly*, 115:954–955, 2008.

[14] J. Sondow. New Vacca-type rational series for Euler's constant and its "alternating" analog ln 4/π. In *Additive number theory, Festschrift in honor of the sixtieth birthday of Melvyn B. Nathanson*, pages 331–340. Eds., D. Chudnovsky, G. Chudnovsky, Springer, New York, 2010.