One hundred balls labelled to are to be put into two identical boxes so that each box contains at least one ball and the greatest common divisor of the product of the labels of all the balls in one box and the product of the labels of all the balls in the other box is . Determine the number of ways that this can be done.
Problem 1716
Official solution
First let's assume the two boxes are different. The balls labelled and can be put into either box. All balls with even labels must then be put into the same box that the ball labelled goes. Thus any ball with label which has a common factor greater than with any one of those even labels must be put into the same box too. Therefore, we only need to consider those balls with labels greater than . That leaves with balls labelled by the primes: , , , , , , , , , . Thus we have twelve entities, namely the ten prime numbers, the number and all the balls that must go with . Each can be put into any of the two boxes. Taking away the cases where one of the boxes is empty, the number of ways is . Since the two boxes are identical, we need to divide this number by . Therefore the answer is .