Find $\sum\frac{a(n)}{n(n+1)}$, where $a(n)$ --- number of 1's in binary expansion of n.

368 Views Asked by At

Let $a(n)$ is a number of 1's in binary expansion of n, find the sum $$ \sum\limits_{n=1}^{\infty}\frac{a(n)}{n(n+1)}. $$

1

There are 1 best solutions below

1
On BEST ANSWER

We can uniquely write the integers with bit $n$ set as $(2k+1)2^n+j$ where $0\le j\lt2^n$. Thus, the contribution to the sum from integers with bit $n$ set is $$ \begin{align} \hspace{-5mm}\sum_{\text{$i$ with bit $n$ set}}\left(\frac1i-\frac1{i+1}\right) &=\sum_{k=0}^\infty\sum_{j=0}^{2^n-1}\left[\frac1{(2k+1)2^n+j}-\frac1{(2k+1)2^n+j+1}\right]\\ &=\sum_{k=0}^\infty\left[\frac1{(2k+1)2^n}-\frac1{(2k+2)2^n}\right]\\[9pt] &=\log(2)\,2^{-n}\tag{1} \end{align} $$ If we now sum over all the bits, we get $$ \begin{align} \sum_{n=1}^\infty\frac{a(n)}{n(n+1)} &=\sum_{n=0}^\infty\log(2)\,2^{-n}\\ &=2\log(2)\tag{2} \end{align} $$