Find all positive integers X and Y such that:
- X divides Y+5, and:
- Y divides X+3
Prove that there are no others.
From the 1st equation, x <= y + 5
From the 2nd equation, y <= x + 3
In other words, y - 3 <= x <= y + 5
Let's consider the only 9 possible cases:
a) x = y + 5
Then (substituting in equation 2), y divides y + 8
y can only be 1,2,4,8
This leads to 4 solutions: (6,1), (7,2), (9,4) and (13,8)
b) x = y + 4
Then (substituting in equation 2), y divides y + 7
y can only be 1,7
this gives rise to no solutions
c) x = y + 3
Then (substituting in equation 2), y divides y + 6
y can only be 1,2,3,6
this gives rise to no solutions
d) x = y + 2
Then (substituting in equation 2), y divides y + 5
y can only be 1,5
this gives rise (3,1)
e) x = y + 1
Then (substituting in equation 2), y divides y + 4
y can only be 1,2,4
this gives rise to (2,1)
f) x = y
Then (substituting in equation 2), y divides y + 3
y can only be 1,3
this gives rise to (1,1)
g) x = y - 1
Then (substituting in equation 2), y divides y + 2
y can only be 1,2
this gives rise to (1,2)
h) x = y - 2
Then (substituting in equation 2), y divides y + 1
y can only be 1
this gives rise to no solutions
h) x = y - 3
Then (substituting in equation 2), y divides y
But, y = x + 3
Then (substituting in equation 1), x divides x + 8
x can only be 1,2,4,8
This leads to 4 solutions: (1,4), (2,5), (4,7) and (8,11)
This method is exhaustive, so there are no other solutions