gives the k element of the Farey sequence of order n.
- The Farey sequence of order n is the sorted sequence of completely reduced fractions between 0 and 1 with denominators not exceeding n.
Examplesopen allclose all
Basic Examples (1)
Generate the Farey sequence of order 5:
Find the 17 element of the Farey sequence of order 24:
Farey arc diagram, connecting adjacent rationals in a Farey sequence:
Show them together:
Visualize a pattern of denominators of a Farey sequence of order 12:
The length of a Farey sequence of few small orders:
Compare to a closed-form formula in terms of Euler's totient function:
Construct Ford circles from a Farey sequence:
Properties & Relations (2)
Introduced in 2014
Updated in 2016