1 | initial version |

You're probably running an older version of Sage. For reasons I (famously) disagreed with, it used to be the case that gcd(2, 4/2) and your gcd(25,50/2) would return 1, because the second term is a rational, and the gcd of rationals was defined to be 1. I thought this was very silly, even though defensible.

After a long discussion on sage-devel (following my first ever post there!) and thanks to work by Simon King (trac # 10771), this is no longer the case, and your code seems to work:

```
sage: gcd_recur(50)
GCD of 15 and 50: 5
GCD of 15 and 25: 5
GCD of 15 and 25/2: 5/2
GCD of 15 and 25/4: 5/4
GCD of 15 and 25/8: 5/8
GCD of 15 and 25/16: 5/16
```

2 | No.2 Revision |

You're probably running an older version of Sage. For reasons I (famously) disagreed with, it used to be the case that gcd(2, 4/2) and your ~~gcd(25,50/2) ~~gcd(15,50/2) would return 1, because the second term is a rational, and the gcd of rationals was defined to be 1. I thought this was very silly, even though defensible.

After a long discussion on sage-devel (following my first ever post there!) and thanks to work by Simon King (trac # 10771), this is no longer the case, and your code seems to work:

```
sage: gcd_recur(50)
GCD of 15 and 50: 5
GCD of 15 and 25: 5
GCD of 15 and 25/2: 5/2
GCD of 15 and 25/4: 5/4
GCD of 15 and 25/8: 5/8
GCD of 15 and 25/16: 5/16
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.