For problems like these, I like to see if we can discover a pattern
Note that the sum of the digits from 1 -9 inclusive = 45
And adding the "1" in the next integer, 10, gives us 46
And we can write this sum as
Sum of the individual digits from 1 - 10^1 inclusive = 1* 45 + 1
Next....the sum of the digits of the integers from 1-99 inclusive = 900
We can see this because we have the digits 1-9 in the ones place repreated 10 times = 10(45) = 450
And we have the sum of the digits in the tens place as 10 ( 1 + 2 +3 +....9) = 10 (45) = 450
And adding the "1" in the next integer (100) gives us this sum = 900 + 1 = 20*45 + 1
Following this, the sum of the individual digits of the integers from 1 -999 = 13,500 [check this for yourself]
And adding the "1" in the next integer (1000) gives us this sum:
13500 + 1 = 300* 45 + 1
Note the pattern that seems to be emerging......the sum of the digits of the integers from 1 - 10^n inclusive =
(n) followed by the number of zeroes calculated as (n - 1) * 45 + 1
So....for instance .....the sum of the digits of the integers from 1 -10^1 inclusive =
(1) followed by ( 1 - 1) zeroes * 45 + 1 =
(1) followed by no zeroes * 45 + 1 =
1*45 + 1
And the sum of the digits of the integers from 1 - 10^2 inclusive =
(2)followed by (2-1) zeroes * 45 + 1 =
(2) followed by 1 zero * 45 + 1 =
20*45 + 1
Note that the sum of the individual digits of the integers from 1 -100^3 =
300*45 + 1......which follows our pattern
This seems to imply that the sum of the individual digits in the integers from 1 - 10^100 inclusive should be :
(100) followed by (100-1) zeroes * 45 + 1 =
100 followed by 99 zeroes * 45 + 1 =
10^101 * 45 + 1 =
4.5 * 10^102 + 1 as found by the Guest and heureka !!!!
