This site is supported by donations to The OEIS Foundation.

# Fractions

Fractions are rational numbers, that is the ratio (or division) of an integer (the numerator) by a positive integer (the denominator), generally represented vertically as

${\displaystyle {\frac {n}{d}},\quad n\in \mathbb {Z} ,\,d\in \mathbb {N} _{+}}$

or horizontally as ${\displaystyle n/d,\,n\in \mathbb {Z} ,\,d\in \mathbb {N} _{+}}$. (${\displaystyle {\tfrac {n}{1}}}$ is the [trivial] fraction corresponding to the integer ${\displaystyle n,\,n\in \mathbb {Z} }$.)

## Contents

If the numerator and the denominator are coprime, then the fraction is said to be in reduced form, i.e. written in lowest terms. For example, ${\displaystyle {\tfrac {12}{16}}={\tfrac {3}{4}}}$.

If ${\displaystyle \scriptstyle |n|\,>\,d\,>\,0}$, the fraction is sometimes referred to as an improper fraction, in which case it might be rewritten as (sometimes referred to as a mixed fraction)

${\displaystyle \operatorname {sgn}(n)\left(\left\lfloor {\frac {|n|}{d}}\right\rfloor +{\frac {\left({\frac {|n|}{d}}-\left\lfloor {\frac {|n|}{d}}\right\rfloor \right)d}{d}}\right),\,n\in \mathbb {Z} ,\,d\in \mathbb {N} _{+},}$

where ${\displaystyle \operatorname {sgn}(n)}$ is the sign function and ${\displaystyle |n|}$ is the absolute value.

For example, ${\displaystyle \scriptstyle {\frac {4}{3}}\,=\,1+{\frac {1}{3}}}$, though generally the addition sign becomes a tacit operator, e.g. ${\displaystyle \scriptstyle 1\,{\frac {1}{3}}}$.

One important sequence of fractions is the sequence of even-index Bernoulli numbers

${\displaystyle {\Bigg \{}1,{\frac {1}{6}},{\frac {-1}{30}},{\frac {1}{42}},{\frac {-1}{30}},{\frac {5}{66}},{\frac {-691}{2730}},{\frac {7}{6}},\cdots {\Bigg \}}}$

In the OEIS, sequences of fractions[1] are generally rendered as two sequences of integers, one for the numerator, the other for the denominator. Both sequences then have Keyword frac and cross-references to each other. In the Bernoulli example, A000367 gives the numerators and A002445 gives the denominators.

However, for sequences of unit fractions, we could say that such and such sequence has the denominators and A000012 has the numerators for all of them.

## Reduced form

Given a fraction ${\displaystyle {\tfrac {N}{D}}}$, one obtains the reduced form (fraction in lowest terms) ${\displaystyle {\tfrac {n}{d}}={\tfrac {N}{D}}}$ by respectively dividing the numerator ${\displaystyle N}$ and the denominator ${\displaystyle D}$ by the gcd of ${\displaystyle N}$ and ${\displaystyle D}$

${\displaystyle n={\frac {N}{\gcd(N,D)}},\quad d={\frac {D}{\gcd(N,D)}}.}$

## Proper, improper and mixed fractions

Fractions are sometimes referred to as either

• Proper fractions: fractions ${\displaystyle \scriptstyle {\frac {n}{d}}}$ s.t. ${\displaystyle \scriptstyle |n|\,<\,d,\,n\,\in \,\mathbb {Z} ,\,d\,\in \,\mathbb {N} _{+}}$;
• Improper fractions: fractions ${\displaystyle \scriptstyle {\frac {n}{d}}}$ s.t. ${\displaystyle \scriptstyle |n|\,\geq \,d,\,n\,\in \,\mathbb {Z} ,\,d\,\in \,\mathbb {N} _{+}}$;
• Mixed fractions: fractions ${\displaystyle \scriptstyle i+{\frac {n}{d}}}$ s.t. ${\displaystyle \scriptstyle i\,\in \,\mathbb {Z} }$ and ${\displaystyle \scriptstyle |n|\,<\,d,\,n\,\in \,\mathbb {Z} ,\,d\,\in \,\mathbb {N} _{+}}$.

## Denumerability of fractions

The fractions ${\displaystyle {\tfrac {n}{d}},\,n\in \mathbb {Z} ,\,d\in \mathbb {N} _{+},}$ are denumerable (i.e. the set of fractions have the cardinality of the integers), since you may well-order them (in lexicographic order), first by the sum ${\displaystyle |n|+d}$ of absolute value of numerator and denominator, then by numerator ${\displaystyle n,\,-(|n|+d), discarding fractions which are not in reduced form along the way, giving

${\displaystyle \{{\tfrac {0}{1}},{\tfrac {-1}{1}},{\tfrac {1}{1}},{\tfrac {-2}{1}},{\tfrac {-1}{2}},{\tfrac {1}{2}},{\tfrac {2}{1}},{\tfrac {-3}{1}},{\tfrac {-1}{3}},{\tfrac {1}{3}},{\tfrac {3}{1}},{\tfrac {-4}{1}},{\tfrac {-3}{2}},{\tfrac {-2}{3}},{\tfrac {-1}{4}},{\tfrac {1}{4}},{\tfrac {2}{3}},{\tfrac {3}{2}},{\tfrac {4}{1}},{\tfrac {-5}{1}},{\tfrac {-1}{5}},{\tfrac {1}{5}},{\tfrac {5}{1}},{\tfrac {-6}{1}},{\tfrac {-5}{2}},{\tfrac {-4}{3}},{\tfrac {-3}{4}},{\tfrac {-2}{5}},{\tfrac {-1}{6}},{\tfrac {1}{6}},{\tfrac {2}{5}},{\tfrac {3}{4}},{\tfrac {4}{3}},{\tfrac {5}{2}},{\tfrac {6}{1}},\ldots \}}$

A037161 Well-order the rational numbers; take numerators. (Interesting graph!)

{0, -1, 1, -2, -1, 1, 2, -3, -1, 1, 3, -4, -3, -2, -1, 1, 2, 3, 4, -5, -1, 1, 5, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, -7, -5, -3, -1, 1, 3, 5, 7, -8, -7, -5, -4, -2, -1, 1, 2, 4, 5, 7, 8, ...}

A037162 Well-order the rational numbers; take denominators.

{1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 1, 1, 2, 3, 4, 4, 3, 2, 1, 1, 5, 5, 1, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 1, 3, 5, 7, 7, 5, 3, 1, 1, 2, 4, 5, 7, 8, 8, 7, 5, 4, 2, 1, ...}

The number of fractions ${\displaystyle {\tfrac {n}{d}},\,n\in \mathbb {Z} ,\,d\in \mathbb {N} _{+},}$ with ${\displaystyle |n|+d=k,\,k\geq 1}$ is given by the following sequence.

A140434 Number of new visible points created at each step in an n X n grid.

{1, 2, 4, 4, 8, 4, 12, 8, 12, 8, 20, 8, 24, 12, 16, 16, 32, 12, 36, 16, 24, 20, 44, 16, 40, 24, 36, 24, 56, 16, 60, 32, 40, 32, 48, 24, 72, 36, 48, 32, 80, 24, 84, 40, 48, 44, ...}