(OEIS A006842 and A006843). Except for , each has an odd number of terms
and the middle term is always 1/2.
Let ,, and be three successive terms in a Farey sequence.
Then
(6)
(7)
These two statements are actually equivalent (Hardy and Wright 1979, p. 24). For , obtain from by inserting the mediant
fraction
between successive terms and when (Hardy and Wright 1979, pp. 25-26; Conway and Guy
1996; Apostol 1997). Given with , let be the mediant of and . Then , and these fractions
satisfy the unimodular relations
(8)
(9)
(Apostol 1997, p. 99).
The number of terms
in the Farey sequence for the positive integer is
The denominators alone form the rows of the prime pyramid (Numberphile 2022, 2:08). Start with the row
for . To obtain row for , insert between every two adjacent entries of row whose sum is , using the old row for all insertions.
This is the denominator part of the mediant construction
above.
Ford circles provide a method of visualizing the Farey sequence. The fractions in other than define a subtree of the Stern-Brocot
tree obtained by pruning unwanted branches (Graham et al. 1994).
The Season 2 episode "Bettor or Worse" (2006) of the television crime drama NUMB3RS
features Farey sequences.
Let
be the product of the nonzero fractions in , and let be the product of over all , allowing unreduced
fractions. Then