Problem:
Let be a positive integer. Claudio has cards, each labeled with a different number from to . He takes a subset of these cards, and multiplies together the numbers on the cards. He remarks that, given any positive integer , it is possible to select some subset of the cards so that the difference between their product and is divisible by . Compute the smallest possible value of .
, 2021
Solution
Solution:
We require that so that the product can be divisible by without being even. In addition, for any , if we can acquire all residues relatively prime to , we may multiply them by some product of to achieve all residues modulo , so it suffices to acquire only those residues. For , we have the numbers to work with (as is superfluous); these give only distinct products, so they cannot be sufficient. So, we must have , whence we have the numbers . These generators are in fact sufficient. The following calculations are motivated by knowledge of factorizations of some small numbers, as well as careful consideration of which sets of numbers we have and haven't used. It is also possible to simply write out a table of which residues relatively prime to are included once each number is added, which likely involves fewer calculations.
First, consider the set . This set generates, among other numbers, those in . Since generates , which spans every residue class mod relatively prime to , we need only worry about
Since can be generated as and can be generated as , we need not worry about these times and , and we may verify
and
using the method we used to generate earlier. So, we only need to worry about
We calculate
each of which doesn't use , allowing us to get all of
so we are only missing and . We find
and
so all numbers are achievable and we are done.