If I took all the numbers from one to one billion:
- How many of them contain at least one '1'?
- If I wrote them out in one long line, how many 1 digits would there be?
Let's make it from 000,000 to 999,999,999 and consider 1,000,000,000 later. One tenth of the numbers start with 1: that makes 100,000,000. Of the remaining 900,000,000, one tenth have a 1 in the second place from the left: 90,000,000 more. Of the remaining 810,000,000, one tenth have a 1 in the third place from the left: 81,000,000 more. Going on this way, you have 100,000,000 +(0.9)x100,000,000 +(0.9)²x100,000,000 +(0.9)³x100,000,000... which I would calculate if I had a nearby calculator! ;-) Of course, remember to add 1 for "one billion".
As to the second question, 1/10 of the numbers have a 1 in the first place; 1/10, in the second; 1/10, in the third, and so on, so the answer is 100,000,000x9, plus 1 for "one billion".