Combinatorics problem on 8-digit numbers Among the $8!$ permutations of the digits $\{1,2,3,\dots,8\}$ consider those arrangements which have the following property: if you take any five consecutive positions, the product of the digits in those position is divisible by 5.
The number of such arrangements is what?
 A: We label the positions for the digits
ABCDEFGH

With the given eight digits, only 5 is divisible by 5, and so all the runs of five consecutive digits must contain 5. This restricts the location of the digit 5 to D and E. There are two ways to select that position and $7!$ ways to permute the remaining digits (since the previous placement guarantees that all the runs of 5 will have their products divisible by 5), for a total of 10080 permutations.
A: HINT:  
Let ABCDEFGH be the number. Then either D or E have to be $5$. Once selecting the position, The rest of the digits have simple permutational arrangement of $7!$. Thus you answer should be: $$^2C_1*7!$$
A: The product of five distinct integers from $\{1,\ldots,8\}$ is divisible by $5$ iff one of the five distinct integers is $5$.  Suppose we take an arrangement of the integers $\{1,\ldots,8\}$.  The first five positions in this arrangement must contain a $5$, and similarly the last five positions must also contain a $5$.  The intersection of these two sets of positions is the set containing the fourth and fifth positions.  Thus, a $5$ must be present in the fourth or fifth position. Conversely, it can be verified that if a $5$ is present in one of these two positions, then any five consecutive positions will contain a $5$.  
It follows that we are looking for the number of arrangements of $\{1,\ldots,8\}$ which contain a $5$ in the fourth or fifth position. There are $2$ ways to choose the position for the $5$, and the remaining seven positions can be filled in $7!$ ways.  Thus, the answer is $2 \times 7!$. 
