Quote:
how many distinct numbers can you make with Four 2's, one 3 and one 13
so the six numbers are:
2 2 2 2 3 13
1 number used:
2, 3, 13 ==> 3 distinct numbers
2 numbers used:
22, 23, 32, 213, 132, 313, 133 ==> 7 distinct numbers
3 numbers used:- With one 2: 3! = 6 (2313, 2133, 3213, 3132, 1323, 1332)
- With two 2: 2*3 = 6 (223, 232, 322, 2213, 2132, 1322)
- With three 2: 1 (222)
Total of 13 distinct numbers
4 numbers used:- With one 2: not possible
- With two 2: 6*2 = 12 (6 different ways to place 2 different numbers)
- With three 2: 4*2 = 8 (two different numbers other than 2 can be placed in 4different ways)
- With four 2: 1 (2222)
Total of 21 distinct numbers
5 numbers used:- With one 2: not possible
- With two 2: not possible
- With three 2: 10*2 = 20 (two different numbers other than 2 can be placed in 10 different ways)
- With four 2: 5*2 = 10 (two different numbers other than 2 can be placed in 5 different ways)
Total of 30 distinct numbers
6 numbers used:- With one 2: not possible
- With two 2: not possible
- With three 2: not possible
- With four 2: 15*2 = 30 (two different numbers other than 2 can be placed in 15 different ways)
Total of 30 distinct numbers
So a total of 30 + 30 + 21 + 13 + 7 + 3 = 104 distinct numbers, just like
heehaww said.
If 13 was substituted with any single digit positive integer other than 2 or 3, the essence of the problem would not change.
Quote:
but what if there were 100 2's?........ then you can't do it long-hand.
This is the same problem but more number cruching. I might post the answer without detailed solution if I can spare some time

.
Quote:
say, how many 3 digit numbers have at least 1 ZERO?
You can do it the way
heehaww did. Or like this for a longer solution:
With 1 zero only:
Our number will be of either of these forms where x and y are non-zero: xy0, x0y.
x and y can get 9 different values. So 9*9 = 81 for each, 162 in total.
With 2 zeros only:
Our number must be of the form x00, again x cannot be 0.
x can get 9 different values, so 9 in total.
There are 9 + 162 = 171 different 3 digit numbers with at least one zero.
Quote:
(10^3 possibilities) - (9^3 without a 0) - (10^2 with a leading 0)
heehaww's answer also yields 171.