FareySequence
generates the Farey sequence of order n.
FareySequence[n,k]
gives the k element of the Farey sequence of order n.
Examples
open allclose allBasic Examples (1)
Scope (1)
Applications (5)
Farey arc diagram, connecting adjacent rationals in a Farey sequence:
Visualize a pattern of denominators of a Farey sequence of order 12:
The length of a Farey sequence for a few small orders:
Compare with a closed-form formula in terms of Euler's totient function:
The product of all nonzero elements of the Farey sequence for a few small orders:
Properties & Relations (2)
Obtain a Farey sequence as a union of Subdivide lists:
FareySequence[n,k] is equivalent to FareySequence[n]〚k〛:
FareySequence[n,k] is much faster:
Text
Wolfram Research (2014), FareySequence, Wolfram Language function, https://reference.wolfram.com/language/ref/FareySequence.html (updated 2016).
CMS
Wolfram Language. 2014. "FareySequence." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/FareySequence.html.
APA
Wolfram Language. (2014). FareySequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FareySequence.html