A computer generates random numbers from the set $\{1,2,3,4,5,6,7,8,9\}$ (each has equal probability). If $n$ numbers are generated (with replacement), what is the probability that the product of all those numbers is a multiple of 10?
Attempt:
Let us see easier case, when $n=4$. The total number of possible random numbers can be counted as the number of non-negative solutions to $$ x_{1} + x_{2} + ... + x_{8} + x_{9} = 4$$ This is because, for example: $\{1,2,3,9\}$ can be seen as $x_{1}=x_{2}=x_{3}=x_{9}=1$ and all others are 0, then again $\{5,5,2,4\}$ as $x_{5}=2, x_{2}=x_{4}=1$ and the others 0. The number of solutions is $\binom{8+4}{4}$.
Now we have to count the total number of possibilities when the product of the generated numbers is multiple of 10. If it is multiple 10, then it must contain a 5 and at least one from $\{2,4,6,8\}$. We can count by the following:
2 generated numbers are $5$ and $2$, with no restriction for the other 2. (note that this can contain $4,6,8$). This will be the same as counting nonnegative solutions: $x_{1} + ... + x_{9} = 2$. Count is $\binom{8+2}{8}$
2 generated numbers are $5$ and $4$, but this time there is restriction for the other 2: it cannot contain 2 because this was counted earlier. This is the number of nonegative solutions for: $x_{1} + x_{3} + ... + x_{9} = 2$. Count is $\binom{7+2}{7}$
2 generated numbers are $5$ and $6$, but restriction for the other 2: cannot contain a 2 or a 4. Similarly we consider: $x_{1} + x_{3} + x_{5} + ... +x_{9} = 2$. Count is $\binom{6+2}{6}$
2 generated numbers are $5$ and $8$, restriction for other 2: cannot contain a 2, 4, or 6. Similarly consider: $x_{1} + x_{3} + x_{5} + x_{7} + x_{8} + x_{9} = 2$. Count is $\binom{5+2}{5}$
So when $n=4$, the probability of interest is $\frac{\binom{8+2}{8} + \binom{7+2}{7} + \binom{6+2}{6} + \binom{5+2}{5}}{\binom{8+4}{8}}$
I want to double check my approach, and also looking for better answers.
To begin, I am making the assumption (that most people would do) that each of the digits is selected in sequence uniformly and independently at random. This makes each of the $9^n$ possible sequences of choices equally likely to occur. This is in direct contrast to only considering the number of each digit selected which results in outcomes that we count which are not equally likely to occur. For instance, the outcome where we have one each of the digits $1,2,3,4,5$ is $5!$ times more likely to occur than the outcome where we have five $1$'s.
To continue, let us look at the opposite outcome: The product of the numbers is not a multiple of $10$
This occurs if and only if at least one of the two events occurs: No $5$'s were included, No even numbers were included.
Let $A$ be the event that no fives were included and $B$ be the event that no even numbers were included.
We have then $Pr(\text{product is multiple of 10})=1-Pr(A\cup B) = 1-Pr(A)-Pr(B)+Pr(A\cap B)$
From here, you should be able to continue.