A flea is initially on a vertex of a regular polygon with 2015 sides; it performs a sequence of jumps counterclockwise: on the first jump it moves by one vertex (from the starting one to the neighboring one), on the second by three, on the third by five, and so on, so that on the -th it starts from a vertex and lands vertices further, always counterclockwise. After how many jumps will it happen for the first time that the flea lands on a vertex it had already visited?
Solution
The answer is 48. We observe that after steps the flea has covered a total distance of vertices from the starting point: this is clearly true for and , and moreover, if after steps the flea has covered a distance of vertices, then on the next step the distance traveled will be . Suppose then that the flea touches a vertex twice, the first time when the distance covered is , the second time when it is . This happens only if the difference between and corresponds to an integer number of laps of the 2015-gon, that is, if and only if 2015 divides , and we are looking for the smallest for which this is possible. Let us take (with minimal) and write , with and positive integers. We now note that : indeed, the numbers are integers
( and are divisors of 2015, so both odd), and satisfy , thus they provide a pair corresponding to a vertex visited twice; now if or were greater than 1 we would also have , which would contradict the minimality of . We therefore want to study the equation , and more precisely distribute the prime factors 5, 13, 31 between and so as to minimize . It is then easy to see that the minimum is obtained for , which gives and .