FareySequence

FareySequence[n]

generates the Farey sequence of order n.

FareySequence[n,k]

gives the k^(th) element of the Farey sequence of order n.

Details

  • The Farey sequence of order n is the sorted sequence of completely reduced fractions between 0 and 1 with denominators not exceeding n.

Examples

open allclose all

Basic Examples  (1)

Generate the Farey sequence of order 5:

In[1]:=
Click for copyable input
Out[1]=

Find the 17^(th) element of the Farey sequence of order 24:

In[3]:=
Click for copyable input
Out[3]=

Applications  (4)

Properties & Relations  (2)

See Also

Rational  MinkowskiQuestionMark  EulerPhi  GCD  Subdivide

Introduced in 2014
(10.0)
| Updated in 2016
(10.4)