# How many different 4-digit numbers can be formed here

a)How many different numbers of 4 digits may be formed with the dgits 0,1,2,5,6,7,8 if no digit is used more than once in any number?

b)Find the sum of all he numbers formed in (a).

I know how to do the part a), but I'm totally stump when I see part b).

Thanks.

VietDao29
Homework Helper
Hmm, I don't think this is the quickest way to tackle this problem. But here's what I try:
1. How many different 4-digit number in a) have '0' at the end?
ie, something like: ***0, where * denotes a random number.
There will be 6 * 7 * 7 = 294 numbers.
Do the same, and you will come up with 294 numbers ends in 1.
294 numbers ends in 2.
294 numbers ends in 5.
294 numbers ends in 6.
294 numbers ends in 7.
294 numbers ends in 8.
So the sum of all numbers found in a will end in:
294 * (0 + 1 + 2 + 5 + 6 + 7 + 8) = 8526.
So it will end in 6 (you still carry 852).
2. How many different 4-digit number that have the form '**0*'??
There will be again 294 numbers. So again, do the same as #1, and remember that you carried 852.
So the second digit from the right of the sum is:
294 * (0 + 1 + 2 + 5 + 6 + 7 + 8) + 852 = 9378.
So the second digit from the right of the sum is: 8.
Now do the same for '*0**', '*1**', '*2**', '*5**', '*6**', '*7**', '*8**'
And '1***', '2***', '5***', '6***', '7***', '8***'
Note that '0***' is not a 4-digit number.
Viet Dao,

So it will end in 6 (you still carry 852).
294 * (0 + 1 + 2 + 5 + 6 + 7 + 8) + 852 = 9378.
Actually, I don't understand the above steps, why we have to add 852? I am sorry that I am too stupid.

There will be 6 * 7 * 7 = 294 numbers.
a)How many different numbers of 4 digits may be formed with the dgits 0,1,2,5,6,7,8 if no digit is used more than once in any number?
Also, should it be 6*5*4? VietDao29
Homework Helper
Ooops, sorry, I forget that 1 digit may only appear once. So that should be 6 * 6 * 5 = 180 (do you know why 6 * 6 * 5, and not 6 * 5 * 4?).
So the sum will end in 0: 180 * (0 + 1 + 2 + 5 + 6 + 7 + 8) = 5220.
This is just the way you add the number. For example, when you want to add 123 + 234 + 345.
123
234
345
---
You should first add 3 + 4 + 5 = 12 (you write 2, carry 1).
123
234
345
---
...2
2 + 3 + 4 = 9, Because you carry 1, 9 + 1 = 10, write 0, carry 1.
123
234
345
---
..02
1 + 2 + 3 = 6, 6 + 1 = 7. So 123 + 234 + 345 = 702.
Now you are arrange the number like:
***0
***0
***0
...
***1
***1
...
***2
***2
...
...
***8
***8
You will try to add their first digit from the right first, then add the second digit from the right, then the third and the forth...
-----------
Do the same, and you will have: the second digit of the sum from the right is 2:
180 * (0 + 1 + 2 + 5 + 6 + 7 + 8) + 522 = 5742
Viet Dao,

I think the solution in this way :

part a)

(7)(6)(5)(4) = 840 ways

part b)

The number of times each digit appear = 4*( 6*5*4) = 480 times

The sum of all numbers that appear in part (a) =

480 *( 0+1+2+5+6+7+8) = 13920

Last edited:
VietDao29
Homework Helper
Mithal said:
I think the solution in this way :

part a)

(7)(6)(5)(4) = 840 ways ??? Why 7 * 6 * 5 * 4? ???
Shouldn't it be 6 * 6 * 5 * 4 = 720?
Because you can choose 1 from the 6 digits 1, 2, 5, 6, 7, 8 to be the first digit (not 0). Then you can choose 1 from 6 other digits (7 digits in total - 1, for the first one).
Mithal said:
part b)

The number of times each digit appear = 4*( 6*5*4) = 480 times

The sum of all numbers that appear in part (a) =

480 *( 0+1+2+5+6+7+8) = 13920
I don't understand...
So assume you are correct on part a (which is not true), and assume all 4-digit numbers are 1000, so the sum should be : 1000 * 480 = 480000 (this is obviously smaller than the sum you want to calculate) > 13920... So again, you are wrong. Viet Dao,

Yes , you are right .Thank you for pointing out that to me . I can solve part (b) in this way now .

The number of time each digit appear in the thousands excluding zero =
(6)* (5) * (4) =120 times

The number of times each digit appear in the three remaings ( i.e the hundreds , tens and units)=(5) *(5) *(4)=100 times
1+2+5+6+7+8=29

The sum of the numbers = (1000) *(120) *(29) +(100) *(100) *(29) +(10)*(100) *(29) +(100) *(29) = 3801900