[Math] Sum of all possible combinations

combinatoricsnumber theorysummation

Guys I just discovered something amazing. Can someone please confirm this? The sum of all possible ways to form a number with $n$ digits, using its digits, without repetition, is equal to $11\ldots1\cdot m(n-1)!$, where $m$ is the sum of the digits of the number, and the amount of $1$'s is equal to $n$. For example, $123$ can be arranged $132, 231, 213, 312, 321$. The sum of these numbers is equal to $1332$. $(111)(6)(2)$. I'll be waiting for my Fields Medal.

Best Answer

Let's take your example of 123.

$123$
$132$
$213$
$231$
$312$
$321$

Let's look at the first digit (the hundreds' place). Since the number of digits is $3$, there will be $3 - 1 = 2$ digits after the first digit. Thus, there will be a total of $(3 - 1)! = 2! = 1$ numbers with each digit as the first.

Thus, the sum of the digits that occur in the hundreds' place (note: all of the digits show up as the first digit) is equal to the sum of the digits, and each digit shows up $(N - 1)!$ times.

Thus, the sum of all of the first-digits is $(digitsum)(N - 1)!$.

It follows that this applies to all of the digits.

Thus, the sum of all of the numbers is $(1\times{digitsum}) + (10\times{digitsum}) + (100\times{digitsum}) + ... + (10^N\times{digitsum})(N - 1)! = 11...11\times{digitsum})(N - 1)!$

QED

Related Question