I want a sequence of all rational fractions x/y with values from 0 to 1 in sorted order, where gcd(x, y) = 1 and x * y ≤ R for some given R ≥ 1. I'm told I can do this by starting with the fractions 0/1 and 1/1, then picking any two consecutive a/b and a'/b' in the sequence and inserting (a + a') / (b + b') between them, as long as (a + a')(b + b') ≤ R. For example with R = 15 the sequence would be
0/1, 1/15, 1/14, 1/13, ..., 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 1/1
But I can't prove that every fraction x/y will eventually be inserted into the sequence. I can start with the sequence [0/1, 1/1], then repeatedly find the two existing sequence elements before and after x/y, and insert an element between them according to the rule that was given. This must end when either I insert x/y, or when the number to be inserted has numerator * denominator > R, but I cannot prove that the second case won't happen.
For example, if R ≥ 35 then 5/7 would be inserted: Starting with [0/1, 1/1], insert 1/2 between them, then 2/3 between 1/2 and 1/1, then 3/4 between 2/3 and 1/1, then 5/7 between 2/3 and 3/4. However, I cannot prove that an arbitrary x/y would be added to the sequence in this way.
Any help? I assume there is either a proof so simple that I just cannot see it, or it is something really deep.
PS. I can produce the sequence by just generating all the elements and then sorting them, but that would be very unsatisfactory.