So we're seeking a (15495)digit number, i.e., a 59 digit number.
The 2digit numbers 19 through 89 contain only eight 9's to start with and would leave you with only 12 digits from the 90's, so at some point you should start looking for 8's rather than 9's.
Let's look at the original 154digit number:
19202122232425262728293031323334353637383940414243444546474849505152535455565758
59606162636465666768697071727374757677787980818283848586878889909192939495
The first 9 is in position 2, leaving 152 digits remaining to form our 59digit number. (I am counting positions from the left.)
We continue like this, but after finding the 5th 9 in position 82, if we took another 9, from position 102, we'd have only 52 digits remaining, but we'd have built only 6 digits of the new number, so we couldn't achieve the 59 we want. So, as the next digit, we'll settle for the 8 in position 100. Now that we have built six digits, taking the 9 from position 102 gives us the 7th digit. Then the remaining 52 digits will complete our 59digit number:
99999897071727374757677787980818283848586878889909192939495,
the first 19 of which are:
9999989707172737475.

Posted by Charlie
on 20081117 16:10:24 