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)}. $$
Asked
Active
Viewed 367 times
3
-
Hint: $\frac{1}{n(n+1)}=\frac{1}{n}-\frac{1}{n+1}$ – Peter Woolfitt May 23 '14 at 14:42
-
duplicate of http://math.stackexchange.com/q/432250/59379 – achille hui May 23 '14 at 15:42
-
@achillehui: well, at least our answers match. It's an interesting question, nonetheless. It's odd that I forgot the earlier question since I had upvoted your answer (and even commented on it). I'm getting too old. – robjohn May 23 '14 at 15:45
-
@robjohn, it is not a surprise you forget. If this isn't one of my highest voted answer, I will not be able to locate it so quickly. – achille hui May 23 '14 at 15:48
1 Answers
10
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} $$

robjohn
- 345,667