Farey
Farey sequences, denoted F_n, are the ascending lists of fractions between 0 and 1 whose denominators do not exceed n, written in reduced form. Each F_n begins with 0/1 and ends with 1/1, and contains every rational a/b with 0 ≤ a ≤ b ≤ n and gcd(a,b) = 1, arranged in increasing order.
Two neighboring terms a/b and c/d in F_n satisfy bc − ad = 1. The mediant, (a + c)/(b
The size of F_n is given by |F_n| = 1 + ∑_{m=1}^n φ(m), where φ is Euler’s totient function.
Farey sequences are named after John Farey, who described the mediant relation in the early 19th century.