2012 AIME I Problem 15
Problem 15 of 15HarderNumber Theory
There are mathematicians seated around a circular table with seats numbered in clockwise order. After a break they again sit around the table. The mathematicians note that there is a positive integer such that
for each the mathematician who was seated in seat before the break is seated in seat after the break (where seat is seat );
for every pair of mathematicians, the number of mathematicians sitting between them after the break, counting in both the clockwise and the counterclockwise directions, is different from either of the number of mathematicians sitting between them before the break.
Find the number of possible values of with
Your answer
Integer from 0 to 999
Show solution
Solution
Condition requires the seats to be pairwise distinct modulo which happens if and only if For condition the two mathematicians from seats and have gap counts before the break determined by and after the break by so the requirement is for all Equivalently, and for every nonzero residue which holds exactly when and are also relatively prime to
So is possible if and only if some satisfies Any three consecutive integers include a multiple of and a multiple of so no works when Conversely, if then works, since has only the prime factors and
The valid with are those congruent to namely for and there are of them.
Tagged: modular arithmetic · greatest common divisor