Skip to main content
OlympiadHQ

Browse · MathNet

Print

Kanada 2014

Canada 2014 counting and probability

Problem

Let be a fixed odd prime. A -tuple of integers is said to be good if (i) for all , and (ii) is not divisible by , and (iii) is divisible by . Determine the number of good -tuples.
Solution
Let be the set of all sequences of numbers from the set such that is not divisible by . We show that . For let be an arbitrary sequence of numbers chosen from . There are exactly choices for such that , and therefore .

Now it will be shown that the number of good sequences in is . For a sequence in , define the sequence by for . Now note that in implies that and therefore is in for all non-negative . Now note that has first element for all and therefore the sequences are distinct.

Now define the cycle of as the set . Note that is in its own cycle since where . Now note that since every sequence in is in exactly one cycle, is the disjoint union of cycles. Now it will be shown that exactly one sequence per cycle is good. Consider an arbitrary cycle , and let where , and note that mod . Let , and and note that for all . Since is not divisible by , there is exactly one value of with such that divides and it is exactly for this value of that is good. This shows that exactly one sequence per cycle is good and therefore that the number of good sequences in is , which is .
Final answer
p^{p-1} - p^{p-2}

Techniques

Enumeration with symmetryInverses mod n