# Probabilty and Permutations

A nine digit number is formed using 1 to 9 without repetition, find the probability of forming a number such that the product of any of its five consecutive digits is divisible by 3 or 5.

Now my approach for solving this problem was to first find out the cases where this would not be possible.

If the product of five consecutive digits is divisible by 3 or 5, then the digits must have atleast a multiple of 3 i.e. 3,6 or 9 or 5 as one of the 5 digits. The only case where this would not be possible would be when the special digits {3,6,9,5} are all huddled at one end of the number taking 4 of the 9 available spaces.

Now we have 4!=24 ways of arranging the four special digits and 5!=120 ways of arranging the remaining digits. Since the special digits can be huddled either at the end or at the start of the number, there would be twice the numbers not satisfying the condition specified in the question.

That results in 2.4!.5!=5760 rebellious numbers.

Since the total possible 9 digit numbers will be 9!=362880, that leaves us with 362880-5760=357120 favourable outcomes. Therefore the required probability should be 357120/362880=0.984

• They could be like $35*****69$, or any other way to distribute them in the beginning or in the end. So your $2$ should actually be...? Jan 24, 2022 at 16:24
$$1-\frac{5\cdot 4!\cdot 5!}{9!}$$