Find the integer $n$ which has the following property: If the numbers from $1$ to $n$ are all written down in decimal notation the total number of digit written down is $1998$. What is the next higher number (instead of $1998$) for which this problem has an answer?
My try:
This problem was given under exercise Inclusion-Exclusion Principle, I think we should first find that $n$ for which above holds, then we'll find the number of digits (same manner as in problem) in $n+1$.
Like digits from: $\begin{cases}1-9 &=9\\ 10-99 &=2\times 90\\ 100-999 &=3\times 900\\ & \vdots\\ \end{cases}$
We can easily see the pattern above. But I don't see whether we seriously need IEP.
How to take it from here?