Date: Feb 2, 2013 9:23 AM
Author: Ciekaw
Subject: Generating coprime pairs (other interpretation)

Modified Calkin-Wilf tree (part)   

1

2/1

1 0

3/2 3/1

1 0 1 0

5/3 5/2 4/3 4/1


System modified Calkin-Wilf tree binary-coded


A/B

1 0

(A+B)/A (A+B)/B


More information:
http://www.narval.republika.pl/treecoprime.jpg



Example generating coprime pairs:

Step 1

Select any number of natural.
For example, C = 167

Step 2

Write binary form C = 10100111


Step 3

Calculate or read from the tree

1

2/1

1 0

3/1

1 0

4/3

1 0

7/3

1 0

10/3

1 0

13/10

1 0

23/13

1 0

36/23


My program:
http://www.narval.republika.pl/coprime.exe



Regards