The sum of $n$(suppose $n$ is positive odd,using $n=23$ as an example):
Step 1 : Get the odd part of $23 + ~~1 $, which is $~~3$,$~~3\times2^3=23 + ~~ 1$,get $s_1 = 3$
Step 2 : Get the odd part of $23 + ~~3 $, which is $13$,$13\times2^1=23 + ~~ 3$,get $s_2 = 1$
Step 3 : Get the odd part of $23 + 13 $, which is $~~9$,$~~9\times2^2=23 + 13$,get $s_3 = 2$
Step 4 : Get the odd part of $23 + ~~9 $, which is $~~1$,$~~1\times2^5=23 + ~~9$,get $s_4 = 5$
Continuing this operation (with $23 + 1$) repeats the same steps as above. There are $4$ steps in the cycle, so the cycle length of $23$ is $4$,and the sum of $23$ is $s_1 + s_2 + s_3 + s_4 = 11$.
The period of the binary expansion of $1/23$ is $11$,so why the sum of $23$ seems equals the period of the binary expansion of $1/23$?