Originally posted by serigado Can you do it for base 2 ? (count the 0 and 1 ? )
I'm not sure I follow you - 2^n in binary is written as 1 followed by exactly n zeros, so this is not very informative. Are you doing some transformation, or something?
You can start by considering another way to write a number.
For example:
0.532 = 0.5 + 0.03 + 0.002
Any number can be written as \sum_{k=1}^{\infty} \frac{a_k}{10^k}
For the number 0.532, a_1 =5 ; a_2=3; a_3 = 2
So, a_k gives the k-th digit of a given number
But there's another way to write a_k:
a_k = floor ( 0.532*10^k ) mod(10)
now instead, of base 10, try base 2, and find a relation between both 🙂
Every now and then this problem comes to my mind but I can't solve it. I want to solve it in a way that I don't use the result and prove its validity. I want to really calculate the sum. ðŸ˜