Using the digits $2$, $3$, $4$, $5$ and $6$, find the sum of all $5$-digit numbers that can be formed such that no two digits are same?

Using the digits $2$, $3$, $4$, $5$ and $6$, find the sum of all $5$-digit numbers that can be formed such that no two digits are same?

Why each of the number would be in any place $4!$ times and not $5!$ times?

And how to find the sum? Please can someone explain. There are many questions based on this concept. But I am not able to understand how to find sum of all the $5$-digit numbers.

Here's another way . . .

There are$\;5! = 120\;$such numbers.

For each such number $n$, pair it with what I'll call its complement:$\;88888-n$

Thus, there are$\;5!/2 = 60\;$such pairs.

It follows that the sum is just $60\times 88888 = 5333280$.

• I did not understand after 120 numbers step @quasi – Sakuzi Markel Aug 25 '17 at 17:13
• For example, pair the number $32645$ with $56243$. Note that they sum to exactly $88888$. You can do this with all the qualifying numbers. So the idea is to group them in pairs. Since each pair adds to $88888$, you can just multiply $88888$ by the number of pairs. – quasi Aug 25 '17 at 17:18
• But why are we making a pair? And why 88888-n? – Sakuzi Markel Aug 25 '17 at 17:21
• Because then we can add repeated sums by multiplication. – quasi Aug 25 '17 at 17:21
• The idea of fixing digits is to count how many times a given digit occurs in a given position. So we can add the contributions from each position more easily. By symmetry, since there are $120$ numbers and $5$ distinct digits, then for any given position, there should be an equal number of each of the digits occurring in that position. Hence the count for each position, each digit is $120/5=24$, or equivalently $5!/5=4!$. – quasi Aug 25 '17 at 17:44

Fix one digit in any place. Then, using the remaining digits, it is clear that $4!$ and not $5!$ numbers can be formed; there are $5!$ 5-digit numbers to sum up in total.

To get the final sum, consider the sum of the digits in the units place first: $4!(2+3+4+5+6)=24\cdot20=480$. This would be multiplied by $10^n$ for the $10^n$ place, so the sum is $480\cdot11111=5333280$.

• Why are we fixing the digit? @ParcyTaxel – Sakuzi Markel Aug 25 '17 at 17:13
• @SakuziMarkel To show that each individual digit occurs only $4!$ times in any given place in the 5 digits. – Parcly Taxel Aug 25 '17 at 17:14
• but normally individual digit occurs 5! times. What is the use of fixing it @ParclyTaxel – Sakuzi Markel Aug 25 '17 at 17:15
• @SakuziMarkel It occurs $5!$ times in the entire sum, $4!$ times in each "fixed" place. – Parcly Taxel Aug 25 '17 at 17:16
• did not understand. I am trying to. It's tough @ParclyTaxel – Sakuzi Markel Aug 25 '17 at 17:18

As an example, how many times does the number $2$ appear in the last position? Or how many numbers can we make of the form $\#\#\#\#2$?

Well we have four positions to fill in with $3$, $4$ ,$5$ and $6$. That's just the same as asking how many four digit numbers are there with those digits? $4!$ is the answer.

Here is another way to look at it. As noted elsewhere, there are 120 different numbers. Since each place (1s, 10s, 100s, etc.) holds 2, 3, 4, 5, and 6 the exact same number of times, the average for each place is $120 \times 44444 = 5333280$.