You want to arrange the numbers in a sequence with the following property: if is divisible by , then the th number is divisible by the th number. How many such sequences are there?
Solution
Let the rearranged numbers be . The number of pairs with must equal the number of pairs with , but since each pair of the former type is also of the latter type, the converse must be true as well. Thus, if and only if . Now for each , the number of values divisible by uniquely determines , so . Similarly, 7,8 must either be kept fixed by the rearrangement or interchanged, because they are the only values that divide exactly 2 other numbers in the sequence; since 7 is prime and 8 is not, we conclude they are kept fixed. Then we can easily check by induction that for all larger composite numbers (by using for all proper factors of ) and (because it is the only prime that divides exactly 1 other number). So we have only the primes left to rearrange, and it is easily seen that these can be permuted arbitrarily, leaving 4 ! possible orderings altogether.