2025 NZMO Round 2 · Question 4
Solutions (answers with justifications) are required for all problems, including those which ask for an answer.
The function is the remainder when is divided by , where . For which does there exist some ordering of such that is an ordering of ? (An ordering of is the sequence of numbers to in some order.)
Show answer and methods 2 methods
Answer
For a nonempty ordering, is the only modulus. If an empty ordering is admitted, also works vacuously.
Method 1 Restrict to multiples of one divisor
Write . For any divisor of , if then . The two lists and contain the same numbers, hence the same number of multiples of . Therefore holds exactly at the indices divisible by . The same counting argument with shows .
Fix any prime and put . At the indices , write and . Both and are permutations of . Dividing the congruence modulo by gives . If then every is zero modulo , which is impossible. Thus .
Let . Multiplication over all gives , by Fermat’s little theorem. As is invertible, . If is odd, pair nonzero residues with their inverses: only and are self-inverse, so , a contradiction.
Every prime divisor of is therefore , and cannot divide . For this forces , and works. At both lists are empty if that convention is used.
Method 2 Exclude odd moduli, then halve an even modulus
For each prime , exactly indices are multiples of . All their products have remainders divisible by , exhausting the available multiples of . Since also has exactly that many multiples of , we have and exactly when .
Suppose is odd and choose . Among the indices not divisible by , each nonzero residue modulo occurs times; the corresponding and product remainders have this same distribution. The product of each of the three lists is therefore by Wilson’s theorem, since is odd. But termwise the third list is the product of the first two modulo , and . This rules out every odd .
If , then at even indices is even, so the product and its remainder are divisible by . At odd indices the remainder is odd. The target remainder cannot appear.
The remaining even moduli have the form with odd. For the even-indexed terms give , , where both and permute . Thus . Since is invertible modulo , the residues again run through all nonzero residues modulo . This would solve the already excluded odd case . Hence , and indeed works.
Adapted from the solution by James Xu · Published solution (external)