Solution of the Week #581 - Inevitable Divisibility

The product will always be divisible by 34560.

For divisibility by each number we need to spread our six numbers as evenly as possible across the modulo classes, so for divisibility by 2, the best we can do is have 3 odd numbers and 3 even numbers. This will result in 6 of the 15 differences being even, contributing a factor of 2^6 = 64 to the final answer.

For 3 we can have 2 of the six divisible by 3, 2 that leave a remainder of 1 and 2 that leave a remainder of 2. This contributes 3^3 = 27 to the final answer.

As 4 is a power of a prime, we also need to consider it, but bear in mind that the factors of 2 have already been included. As a minimum, 2 of the 15 difference will be divisible by 4, contributing 2^2 = 4 to the final answer.

Finally there must be at least 1 pair that differ by 5, contributing a factor of 5 to the answer.

So 64 x 27 x 4 x 5 = 34560.

In the general case, for n numbers, the answer will be the product of all the factorials up to (n-1)! In this case 1 x 2 x 6 x 24 x 120 = 34560.