MathDB
Math Prize 2017 Problem 11

Source:

September 26, 2017
Math Prize for Girls

Problem Statement

Let S(N)S(N) be the number of 1's in the binary representation of an integer NN, and let D(N)=S(N+1)S(N)D(N) = S(N + 1) - S(N). Compute the sum of D(N)D(N) over all NN such that 1N20171 \le N \le 2017 and D(N)<0D(N) < 0.