I did it with a spreadsheet ...
Range #digits Count of Range digxcount Remaining to 40000
1 to 9 1 9 9 9 39991
10 to 99 2 90 180 189 39811
100 to 999 3 900 2700 2889 37111
1000 to 9999 4 9000 36000 38889 1111
10000 to 10221 5 222 1110 39999 1
When you get to 9999 there are only 1111 spots left to go. The next numbers are five digits each. So divide 1111 by 5 and come up with 222.2. Since .2 = 1/5 it is the first number after the 222 digit. Well that's clearly a 1.
In the end of the spreadsheet clip above, you are 1 away from 40000, so the next number is a 1 -- the first digit of 10222.
|
Posted by Lawrence
on 2003-08-30 00:39:45 |