Seven digit numbers are formed using digits 1,2,3,4,5,6,7,8,9 without repetition. The probability of selecting a number such that product of any 5 consecutive digits is divisible by either 5 or 7 is p. Then 12p is equal to ?
The answer is 7.
I tried many different ways that I could think of but am unable to get an answer.
Please help!!!1
HINT:
Since $5$ is prime, for the product $5$ consecutive digits to be divisible by $5$, clearly the digit $5$ needs to be one of those digits.
The same goes for $7$.
So, the question can be rephrased as: What is the probability that if you create a $7$ digit number in the way as described, any five consecutive digits of that number contain either a $5$ or a $7$?
And, to answer that question, it is probably easiest to calculate the probability of that $7$ digit number contain some sequence of five consecutive digits that does not contain a $5$ or a $7$, and subtract that from $1$ to get your answer.