Skip to main content
OlympiadHQ

Browse · MathNet

Print

Irska

Ireland geometry

Problem

Consider a rectangular billiards table meters wide and meters long with pockets at its corners, where and are both positive integers. A ball is placed at the lower left corner of the table and shot at a degree angle. It travels without friction until it lands in one of the pockets. Every time it hits an edge of the table the angle of reflection is equal to the angle of incidence. How many ordered pairs of integers are there with such that on a by table, the ball eventually lands in the upper left pocket?

problem
Solution
Following the hint, we observe that the ball lands in a pocket as soon as the line segment reaches a point where is divisible by both and ; clearly is the least common multiple of and . The ball touches a vertical rail times and a horizontal rail times. If is even/odd, the ball lands in a pocket on the left/right side of the table, and if is even/odd, the ball lands in a pocket on the lower/upper side of the table. Hence the ball lands in the upper left pocket exactly when is even and is odd.



Write and , where and are odd. Then . Since is odd, is even and is odd precisely when .

If is odd, then the ball lands in the upper left pocket whenever is even; there are such allowed values of . If is divisible by but not by , then the ball lands in the upper left pocket whenever is divisible by ; there are such allowed values of , and so forth.

Fix an integer and count the ordered pairs with for which the ball lands in the upper left pocket. In the calculation we use .

When , then there are allowed values of ; summing over all such gives us total ordered pairs. When , there are allowed values of ; summing over all such gives us total ordered pairs, and so forth. For , there are a total of allowed ordered pairs, so this is our answer.
Final answer
672084

Techniques

Cartesian coordinatesLeast common multiples (lcm)Factorization techniquesSums and products