We construct 4-digit numbers, which are chosen from any of the following seven digits: 0, 1, 3, 5, 7, 8, 9. So basically, we construct 4-digit numbers, which are chosen from any of the following seven digits: 0, 1, 3, 5, 7, 8, 9.

What is the probability of a number having no digit ‘7’ and containing two or more identical digits?

4 digit numbers that starts with 0s count too, like 0177
For the moment I have the number of 4 digits numbers that uses these 7 digits : $7^4 = 2401$.
Then I have the number of 4 digits numbers with at least 2 identical numbers which is : $2401 - 840 = 1561$
the 840 comes from the $P(n,r) = \frac{n!}{(n-r)!}$
Then I have the number of 4 digit numbers without the digit 7 which is $6^4 = 1296$
But then I don't really know where to start to find the probability they ask.
 A: Using the rule of product, for each of three cases; the first case is that the first repeat digit occurs in the second placement, the second case is that the first repeat digit occurs in the third placement, and the third case is that the first repeat digit occurs in the fourth placement, the desired probability is:
$$ \frac{6 \times 1 \times 6 \times 6\ +\ 6 \times 5 \times 2 \times 6\ +\ 6 \times 5 \times 4 \times 3}{7^4}. $$
A: Alternative approach:
$$\frac{6^4 - \left[\binom{6}{4} \times 4!\right]}{7^4}. \tag1 $$
In (1) above, the denominator represents the total number of ways of forming any $(4)$ digit number, sampling with replacement, where order of selection is deemed relevant.
In (1) above, the first term in the numerator represents the corresponding number of ways of forming any $(4)$ digit number, when the digit $(7)$ is excluded.
In (1) above, the second term in the numerator represents that you must deduct those $(4)$ digit numbers, where $(7)$ is excluded, and $(4)$ distinct digits are selected.
A: First look at the options without any 7. There are 1296 of these. There are 15 possible combinations of 4 distinct digits, each of which has 24 arrangements. Therefore, the number of possible combinations is 1296 - (15)(24), which is 936. Therefore, the answer is $936/2401$.
