Farey Sequence Calculator
Enter a positive integer order.

What Is the Farey Sequence?

The Farey sequence of order n, written Fn, consists of all reduced fractions between 0 and 1 whose denominators do not exceed n, arranged in increasing order. The simple example F5 begins 0/1, 1/5, 1/4, and ends with 1/1. Neighboring terms ab,cd always satisfy bc-ad=1. This elegant property ensures fractions are as close as possible without sharing denominators.

A Glimpse of Number Theory

Farey sequences relate intimately to mediants and Diophantine approximation. In each step between Fn and Fn+1, one inserts mediant fractions a+cb+d whenever the new denominator does not exceed n+1. This iterative construction reveals how rational approximations to real numbers become finer as the order increases.

Historical Connections

John Farey, an English geologist, observed a pattern in the arrangement of fractions in 1816, though the concept had been studied earlier by mathematicians such as Cauchy. Farey sequences later gained prominence in geometry and dynamical systems. For instance, they describe the winding numbers of closed geodesics on a torus, encode rotations in continued fraction expansions, and even appear in the study of the Riemann hypothesis via Ford circles.

Using the Calculator

Provide an integer n greater than zero. The algorithm constructs the sequence starting from 0/1 and 1/n. It iteratively generates next terms by computing mediants and updating a pair of neighboring fractions. Because each mediant has denominator b+d, the sequence respects the order restriction. The resulting list shows how rationals fill the interval ever more densely as n grows.

Farey sequences provide insight into fractions that closely approximate irrational numbers. For example, fractions neighboring 1\phi, where \phi is the golden ratio, follow a pattern related to Fibonacci numbers. By generating sequences for large orders, you can discover how simple fractions approximate famous irrational constants with surprising accuracy.

Related Calculators

Characteristic Polynomial Calculator - Matrix Eigenvalue Tool

Compute the characteristic polynomial of a 2x2 or 3x3 matrix and learn how it relates to eigenvalues.

characteristic polynomial calculator eigenvalues

Fourier Series Calculator - Decompose Periodic Functions

Compute a truncated Fourier series for a function on [-π, π] to study periodic behavior.

Fourier series calculator harmonic analysis periodic functions

Bisection Method Calculator - Find Roots of Continuous Functions

Approximate a root of a continuous function on a given interval using the bisection method.

bisection method calculator root finding numerical analysis