1999 AIME Problem 7
Problem 7 of 15IntermediateNumber TheoryCombinatorics
There is a set of switches, each of which has four positions, called and When the position of any switch changes, it is only from to from to from to or from to Initially each switch is in position The switches are labeled with the different integers where and take on the values At step of a -step process, the th switch is advanced one step, and so are all the other switches whose labels divide the label on the th switch. After step has been completed, how many switches will be in position
Your answer
Integer from 0 to 999
Show solution
Solution
The switch labeled is advanced exactly once for each step whose label is a multiple of The multiples of among the labels are the with etc., so that switch advances times. It returns to position exactly when this count is a multiple of
Write each ranging over through We count the triples where is not divisible by either all three are odd, or exactly one is even but not divisible by Among there are odd values and values ( ) that are twice an odd number. That gives triples of the first kind and of the second, or in all.
Therefore switches end in position
Tagged: prime factorization · modular arithmetic · complementary counting