Consider all nine-digit numbers consisting of one each of the digits 1 through 9.
What is the sum of these numbers?
There are 9!=362,880 numbers in all. The average number is
555,555,555. The sum of all the numbers is therefore 362,880 *
555,555,555 = 201,599,999,798,400.
For the n-digit numbers with digits from 1 to n, the same idea works
out to give the sum n!*[(n+1)/2]*[(10^n)-1]/9. For example, when n=2,
one gets 2*(3/2)*11=33=12+21.
|
Posted by Richard
on 2006-04-14 15:57:23 |