Cantor's Diagonalisation

Please write the programs directly into the section Programs at the end of this document!

Problem

Implement a function Successor, which computes the successor of a positive rational number according to Cantor's diagonalisation scheme.
Use rule based programming style in your program (i.e. use recursion and pattern matching for the different steps in the diagonalisation procedure).

TableForm[Table[(i/j),{i,1,10},{j,1,10}]]

One possibility to run through these numbers would be as follows:

Successor[(1/2)]

Successor[(1/3)]

Successor[3]

Successor[4]

The function Successor should be intelligent enough to find the successor of a number r from only the information available in r, it should not rely on any global information about values already found earlier in the diagonal scheme. In particular, the function must decide autonomously, which way to proceed and which values to skip. This means also, that there is no need for a master function that implements running through the scheme. As seen in the example above, running through the scheme will simply be possible through repeated application of Successor. The main point in this exercise is to make Successor intelligent enough to handle all possible cases.
The following command will produce the first hundred rational numbers in the scheme starting from 1 (we will soon learn more about NestList and related commands).

NestList[Successor,1,100]

You can rely on the assumption that a number given as parameter to Successor is a proper fraction. You don't need to treat inputs like e.g. (2/2).

Programs

Tests

Successor[(1/5)]

Successor[(7201/345347645)]

NestList[Successor,1,100]

NestList[Successor,(7201/345347645),100]