Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Wikipedia gives an interesting infinite sum for Euler's constant $\gamma$ and I was wondering how one would evaluate this interesting sum. The sum is given as follows:

Let $N_0 (x)$ and $N_1 (x)$ represent the number of zeros (OEIS A023416) and ones (OEIS A000120) respectively of the binary expansion of $n$.

$$ \sum_{n=1}^\infty \frac{N_1(n) + N_0(n)}{2n(2n+1)} = \gamma $$

share|cite|improve this question
See this and this. – J. M. Aug 16 '12 at 14:53
The numerator of the summand is simply the total number of digits in the binary expansion of $n$, which is $ \lfloor \log_2 n \rfloor +1 $ so the problem can be changed to showing that $$\sum_{n=1}^{\infty} \frac{ \lfloor \log_2 n \rfloor }{2n (2n+1)} = \gamma + \log 2 -1.$$ – Ragib Zaman Aug 16 '12 at 14:54
To add to @Ragib, there is the following series, due to Vacca: $$\sum_{k=1}^\infty (-1)^k \frac{\lfloor\log_2 k\rfloor}{k}$$ – J. M. Aug 16 '12 at 15:08
On the linked Wikipedia page it also states Nielsen (1897) found $$\gamma= 1- \sum_{k=2}^{\infty} (-1)^k \frac{ \lfloor \log_2 k \rfloor }{k+1} .$$ Another way to write $\lfloor \log_2 k \rfloor +1$ is $\lfloor \log_2 2k \rfloor $ so our series could also be viewed as $$\gamma = \sum_{k=1}^{\infty} \frac{ \lfloor \log_2 2k \rfloor }{ 2k (2k+1) }.$$ This series appears to be related to the even terms of the sum of Vacca's and Nielsen's series. – Ragib Zaman Aug 16 '12 at 15:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.