Select a positive integer n. Find the simplest fraction of all denominators that do not exceed n and sort them from small to large. This score sequence is called the Farey sequence.
Theorem: In a Farey sequence, for any two adjacent fractions, first...