[Math] Probability a product of $n$ randomly chosen numbers from 1-9 is divisible by 10.

divisibilityprobabilityrandom

I'm working on a problem where each number is chosen randomly from 1-9. Given $n$ numbers chosen in this manner, we multiply all of these together. I'm looking for the probability that this product is divisible by 10.

I reasoned that we only get a multiple of 10 when we multiply 5 and an even number together. So if either all $n$ numbers are odd or if none of the $n$ numbers is 5, then the product will not be divisible by 10, and we can take 1 – P(Not Divisible by 10).

From here, I'm not sure how to come up with a numerical answer when there is an ambiguous number of $n$ randomly chosen numbers. Is there some way to get there? Or is this reasoning flawed?

Best Answer

Not sure this is the most efficient, but:

  1. The probability it is not divisible by $5$ is $(1 - 1/9)^{n}$.

  2. The probability it is not divisible by $2$ is $(1 - 4/9)^{n}$.

  3. The probability it is not divisible by $2$ and $5$ is $(1 - 5/9)^{n}$.

The quantity you seek is $1 - ((1 - 1/9)^{n} +(1 - 4/9)^{n} -(1 - 5/9)^{n})= 1 - (8/9)^n -(5/9)^n + (4/9)^n$.