If all zeros are removed from 1 to 1 million, what is sum of all remaining numbers?

nymphea

New member
Joined
Jun 26, 2013
Messages
1
A book is filled with all positive integers from 1 to 1,000,000 as follows 1 2 3 4 5 6 … 1020456 1020457 1020458 …. 1040506 etc A moth eats all the zeros – So 1020456 will appear as “1 2 456” so 1040506 will appear as “1 4 5 6” Now if you add all of these separated numbers in the entire book – what is the total sum? Generic problem: Numbers are written from 1 to 1,000,000 of radix r, and the moth eats all number ‘a’ where a < r. What is the sum of all the separated numbers. Please Help! It's a matter of liFe and death!!!
 
I would break the problem up by number of zeros.

If there are 7 zeros, we only have one choice: 1 (Now we can assume there are only 7 digits for the rest of the problem)

If there are six zeros, then it can only be a digit followed by six zeros so 1+2+...+8+9.

If there are five zeros, then it can only be (1) two digits followed by five zeros, or (2) a digit followed by six digits only one of them nonzero (but it cannot be in the second position after the first digit):

For (1): \(\displaystyle 11+12+...+98+99\)
For (2): Fix a value for the first digit : x. Then for argument, assume we are looking at numbers of the form x0y0000. Accounting for all possibilities for y, we get (x+1)+(x+2)+...+(x+9) = 9x+(1+2+...+9). But y can actually be in any of five places, so accounting for all of these: 5(9x+(1+2+...+9)) = 45x+5(1+...+9). Then account for all x: 45(1+...+9) + 9*[5(1+...+9)] = 90(1+2+...+9)

And continue in this way.
 
Last edited:
Top