MathDB
Centroamerican 2018, problem 6

Source: 2018 Centroamerican and Caribbean Math Olympiad

June 25, 2018
combinatoricsCentroamerican

Problem Statement

A dance with 2018 couples takes place in Havana. For the dance, 2018 distinct points labeled 0,1,,20170, 1,\ldots, 2017 are marked in a circumference and each couple is placed on a different point. For i1i\geq1, let si=i (mod 2018)s_i=i\ (\textrm{mod}\ 2018) and ri=2i (mod 2018)r_i=2i\ (\textrm{mod}\ 2018). The dance begins at minute 00. On the ii-th minute, the couple at point sis_i (if there's any) moves to point rir_i, the couple on point rir_i (if there's any) drops out, and the dance continues with the remaining couples. The dance ends after 201822018^2 minutes. Determine how many couples remain at the end.
Note: If ri=sir_i=s_i, the couple on sis_i stays there and does not drop out.