Problem:
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
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, must either be kept fixed by the rearrangement or interchanged, because they are the only values that divide exactly other numbers in the sequence; since is prime and 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 other number). So we have only the primes left to rearrange, and it is easily seen that these can be permuted arbitrarily, leaving possible orderings altogether.