Well, in order to figure this out, you need to know your numbers. The first 2 questions are easy to figure out. The next number after 5 is 6 as the sequence's rule is +1.
Writing seventeen digits doesn't necessarily mean the number she stopped at is 17. The question asks how many digits. In that case, 1-9 is 9 digits as they don't have more than one digit in their number. So, 17-9 is 8. If numbers up to 99 have two digits, the number will not go that high as we only have 8 more digits. 8 divided by 2 is 4. So four more numbers. 10, 11, 12 ,13. The number she stopped at is 13.
The next question, how many digits up until 20? Well, we know 17 digits are up until 13. So 13-20 is 7 numbers. And if we know the numbers are two digit ones, 7x2 is 14 so fourteen digits from 13-20 (not including 13). 14+17 is 31. So thirty-one digits up until 20.
You don't need to count the digits one by one to work it out. But of course, if you find it easier to do so, it's all right. Another way to work it out is knowing how many 1 digit numbers included, how many 2 digit numbers are included and so on. Knowing that you have to multiply the number of numbers by how many digits it has.
An example:
1-200.
1-9 is 9 digits. Nine numbers times 1= 9
10-99 is 90 numbers (including 10 and 99). So 90x2 is 180. So 180 digits.
100-200 is 101 numbers (Including 100 and 200). So 101x3 is 303 digits.
9+180+303=492.
Between 1 and 200 (Including 1 and 200), there are 492 digits.
Attached is a file, an answer from the internet to prove my answer.