On Euclid's Algorithm and Elementary Number Theory
Roland Backhouse, Jo\~ao F. Ferreira

TL;DR
This paper demonstrates how Euclid's algorithm can be used as a tool for verifying and discovering number theory theorems, introduces new properties of gcd, and presents a novel enumeration method for positive rationals.
Contribution
It introduces a new algorithm for enumerating positive rationals based on Euclid's algorithm, unifying known and new enumeration methods with optimal complexity.
Findings
Verification of classical number theory theorems using Euclid's algorithm
Discovery of new distributivity properties of gcd
Development of a new rational enumeration algorithm with optimal complexity
Abstract
Algorithms can be used to prove and to discover new theorems. This paper shows how algorithmic skills in general, and the notion of invariance in particular, can be used to derive many results from Euclid's algorithm. We illustrate how to use the algorithm as a verification interface (i.e., how to verify theorems) and as a construction interface (i.e., how to investigate and derive new theorems). The theorems that we verify are well-known and most of them are included in standard number theory books. The new results concern distributivity properties of the greatest common divisor and a new algorithm for efficiently enumerating the positive rationals in two different ways. One way is known and is due to Moshe Newman. The second is new and corresponds to a deforestation of the Stern-Brocot tree of rationals. We show that both enumerations stem from the same simple algorithm. In this…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
