MathDB
Problems
Contests
National and Regional Contests
Mexico Contests
Mexico National Olympiad
2019 Mexico National Olympiad
5
5
Part of
2019 Mexico National Olympiad
Problems
(1)
Another grasshopper problem
Source: Mexico National Olympaid 2019 P5
11/12/2019
Let
a
>
b
a > b
a
>
b
be relatively prime positive integers. A grashopper stands at point
0
0
0
in a number line. Each minute, the grashopper jumps according to the following rules: [*] If the current minute is a multiple of
a
a
a
and not a multiple of
b
b
b
, it jumps
a
a
a
units forward. [*] If the current minute is a multiple of
b
b
b
and not a multiple of
a
a
a
, it jumps
b
b
b
units backward. [*] If the current minute is both a multiple of
b
b
b
and a multiple of
a
a
a
, it jumps
a
ā
b
a - b
a
ā
b
units forward. [*] If the current minute is neither a multiple of
a
a
a
nor a multiple of
b
b
b
, it doesn't move.Find all positions on the number line that the grasshopper will eventually reach.
number theory
algebra