This challenge involves building up a set F of fractions using a starting fraction and two operations which you use to generate new fractions from any member of F.
Rule 1: F contains the fraction 1/2.
Rule 2: If p/q is in F then p/(p+q) is also in F.
Rule 3: If p/q is in F then q/(p+q) is also in F.
After thinking about it a bit, you can prove that no fraction exists where p|q (p divides q), and that all fractions are between 0 and 1. Also, you can work your way backward from a fraction to get the list of operations that generated it (from 1/2). I used 'A' to represent Rule 2 and 'B' for Rule 3. It turns out that the pattern ABABABABABAB...B homes in on sqrt(2)-1 while ABABABABABAB...A homes in on sqrt(1/2) as the length of the pattern increases. This is related to continued fractions, and using the operations A and B, you can generate any continued fraction (in between 0 and 1) and thus any rational number in that range.
Anyway, I had fun doing this, and was wondering if anyone else had some problems like it.
Rule two states that for every value in set F of p/q, there exists a value in F of p/(q+p). So, for 1/2, there would also be 1/3, 1/4, 1/5, and so on (because p never changes there).
Rule three states that for every value in set F of p/q, there exists a value in F of q/(p+q). So for 1/2, there would also be 2/3, 3/5, 5/8, 3/4, 4/5, 4/7, 2/7, and so on.