Alice is given a rational number and a line, on which there are two points , with a red bead placed at and a blue bead placed at . Alice uses these to play a solitaire game. On each turn, she selects an integer (not necessarily positive) and a bead to move. If this bead is at position , and the other bead is at position , then Alice moves the selected bead to a position such that . Alice's goal is to move the red bead onto . Find all rational numbers for which Alice can accomplish her goal within 2021 turns.
, 2022
Solution
All with .
Denote the red and blue beads by and , respectively. Introduce coordinates on the line and identify the points with their coordinates so that and . Then, during the game, the coordinate is always smaller than the coordinate of . Moreover, the distance between the beads always has the form with , since it only multiplies by the numbers of this form. Denote the value of the distance after the move by , (after the move we have just the initial position, so ).
If some bead is moved in two consecutive moves, then Alice could instead perform a single move (and change the distance from directly to ) which has the same effect as these two moves. So, if Alice can achieve her goal, then she may as well achieve it in fewer (or the same) number of moves by alternating the moves of and . In the sequel, we assume that Alice alternates the moves, and that is shifted altogether times.
If is shifted in the move, then its coordinate increases by . Therefore, the total increment of 's coordinate, which should be 1, equals
for some . Thus, if Alice can reach her goal, then this equation has a solution for (we can add equal terms to both sums in order to increase ).
Conversely, if (1) has a solution for , then Alice can compose a corresponding sequence of distances and then realize it by a sequence of moves. So the problem reduces to the solvability of (1) for .
Assume that, for some rational , there is a solution of (1). Write in lowest terms as . Substitute this into (1), multiply by the common denominator, and collect all terms on the left hand side to get
for some . We assume that there exist indices and such that and .
Reducing (2) modulo (so that ), we get
Since , this is possible only if .
Reducing (2) modulo (so that ), we get
for some odd (thus nonzero) with . Since , this is possible only if . So , and hence .
her goal. For this purpose, in (1) we put , , and
.