Beelines

Original Problem

This problem is about straight lines joining the origin to different points (with integer coordinates) in the first quadrant. Here are some examples:
Grid

For some of these points one coordinate is a factor of the other, for some the coordinates have a common factor, but for others the coordinates are coprime (that is they have no common factor except 1).

The lines cross the grid in different ways:

Can you find any relationships between the number of squares that lines cross and the coordinates of their end points and explain why they work?

Can you find any relationships between the number of grid lines that lines cross and the coordinates of their end points and explain why they work?

Can you describe any relationships between the coordinates of the end points of lines, the lengths of the lines and the lengths of the diagonals of any rectangles they cross?

Here is the solution which arrived only just in time to be included!

Dear Cambridge,
We have found a solution to the October Six puzzle Beeline.

First we drew up a table showing the number of squares crossed in certain examples

P Q squares crossed
1 2 2
1 3 3
1 4 4 etc
2 3 4
2 5 6
2 7 8
3 4 6
3 5 7
3 7 9

From this we can see that the number of squares crossed is likely to be P+Q - 1

We can prove this by showing that when you cross from (0,0) to (3,4) you are going along 3 squares to the right and up 4 squares. However you cannot count the corner square twice therefore it is 3 squares (P) to the right plus 4 squares (Q) up take away one for the corner square, or P+Q -1.

Prav and Sheli from the North London Collegiate School Maths Puzzle Club.