Problem:
Let  and  be odd integers greater than . An  rectangle is made up of unit squares where the squares in the top row are numbered left to right with the integers  through , those in the second row are numbered left to right with the integers  through , and so on. Square  is in the top row, and square  is in the bottom row. Find the number of ordered pairs  of odd integers greater than  with the property that, in the  rectangle, the line through the centers of squares  and  intersects the interior of square .
Solution:
Square is in the bottom row, and notice that is in the first row, followed by , so we can bound by noticing and .
Notice that we can also bound the total number horizontally just because the "least" we can count by is to keep in the top row which would make .
We also know that and are odd.
Since is odd, we see that the it would pass through the center of the average between the squares or , and so determining whether it intersects the square is determined based off the angle at which it hits the center, particularly a slope of between and .
Notice that the key bad cases occur in which the line is purely vertical, or shifted one above/below making the line have slope exactly , or .
In particular, this occurs at .
Along with this, it would be bad if was one greater or less so there would be three bad cases total.
Now, we can just count, going by each .
In particular, if , can range from to minus , , and (but is even anyway), and the total number of odd values that work is .
Similarly for , it would range from to where are bad, yielding values.
For it ranges from to , in which are all bad yielding values.
And lastly for it ranges from to , where are bad yielding values.
Adding these all up yields
The problems on this page are the property of the MAA's American Mathematics Competitions