Farey Sequences

Warren J. Code and Keith F. Taylor
Dalhousie University

For a positive integer n, the Farey sequence of order n is the set

Fn = {p/q : 0 ≤ pqn, q ≠ 0}
written in increasing order. They are named after a geologist, John Farey, who described their generation in [2]. See [1] for details and the interesting connection to Pick's Theorem.

We have developed a mathlet that displays the elements of a Fn at their locations in the unit interval, where n is chosen by the user. At p/q, a line segment of height 1/q is drawn, for each p/q in Fn. This method of display illustrates the self-similar structure of the rational numbers in a compelling manner.

The mathlet can be used as a teaching and exploration tool at many levels, from children in middle school learning relative sizes of fractions to real analysis students studying the classical example of a function whose set of points of continuity consists of exactly the irrational numbers.

Software Specifications:

Web browser capable of Java 1.1 (Internet Explorer 5, Mozilla Firefox, or Netscape 4, or higher) with Unicode character set selected.

Open the Farey Sequence Mathlet.


[1] M. Bruckheimer and A. Arcavi, Farey series and Pick's area theorem, The Mathematical Intelligencer 17 (2) (1995), 64-67.

[2] J. Farey, On a curious property of vulgar fractions, Philosophical Magazine 47 (1816), 385-386.