Problem:
Daniel wrote all the positive integers from to inclusive on a piece of paper. After careful observation, he realized that the sum of all the digits that he wrote was exactly . Find .
Problem:
Daniel wrote all the positive integers from to inclusive on a piece of paper. After careful observation, he realized that the sum of all the digits that he wrote was exactly . Find .
Solution:
Let denote the sum of the digits of , and let . (We may add because .) Observe that:
If is an integer between and inclusive, then:
Summing, we get:
This formula can be used to find benchmarks. However, it turns out that this formula alone will suffice, as things turn out rather nicely:
Therefore , and our answer is .