# Conway base 13 function

The Conway base 13 function is a function created by British mathematician John H. Conway as a counterexample to the converse of the intermediate value theorem. In other words, even though Conway's function f is not continuous, if f(a) < f(b) and an arbitrary value x is chosen such that f(a) < x < f(b), a point c lying between a and b can always be found such that f(c) = x. In fact, this function is even stronger than this: it takes on every real value in each interval on the real line.

## The Conway base 13 function

### Purpose

The Conway base 13 function was created as part of a "produce" activity: in this case, the challenge was to produce a simple-to-understand function which takes on every real value in every interval. It is thus discontinuous at every point.

### Definition

(The following is Conway's own notation.)

The Conway base 13 function is a function $f:\mathbb{R} \to \mathbb{R}$ defined as follows.

If $x \in \mathbb{R}$, write $x$ as a tredecimal (a "decimal" in base 13) using the 13 underlined 'digit' symbols $\underline{0}$, $\underline{1}$, $\underline{2}$, ..., $\underline{8}$, $\underline{9}$, $\underline{+}$, $\underline{-}$, $\underline{\cdot}$ (and avoid $\underline{\cdot}$ recurring). (There may be a leading sign, and somewhere there will be a tredecimal point to distinguish the integer part from the fractional part; these should both be ignored in the sequel.)
If from some point onwards, the tredecimal expansion of x consists of an underlined signed ordinary decimal number, r say, then define $f(x) = r$, otherwise $f(x) = 0$. For example,
$f(\underline{7{+}{\cdot}1}\,.\,\underline{4{+}3{\cdot}14159\ldots}) = f(\underline{7{+}{\cdot}14{+}3{\cdot}141}\,.\,\underline{59\ldots}) = \pi$

Note that the tredecimal point and earlier underlined + and $\cdot$ are ignored, as there are later occurrences of non-decimal digits. (More precisely, to have the $f(x)=r$ case, the trailing part must consist of either $\underline{+}$ or $\underline{-}$, followed by some finite number (possibly zero) of underlined decimal digits, followed by $\underline{\cdot}$, followed by some number (possibly infinitely many) underlined decimal digits. Other possible cases can be permitted, but it makes no difference to the crucial properties of the function.)

### Properties

The important thing to note is that the function $f$ defined in this way satisfies the conclusion of the intermediate value theorem but is continuous nowhere. That is, on any closed interval $[a,b]$ of the real line, $f$ takes on every value between $f(a)$ and $f(b)$. Indeed $f$ takes on the value of every real number on any closed interval $[a,b]$ where $b > a$. To see this, note that we can take any number $c \in (a,b)$ and modify the tail end of its base 13 expansion to be of the form $\underline{c}$ (with c being written as a signed decimal). We can do this in such a way that the new number we have created, call it $c'$, still lies in the interval $[a,b]$ (by modifying c far enough along its terdecimal representation), but we have made $f(c')=c$ a real number of our choice. Thus $f$ satisfies the conclusion of the intermediate value theorem (and then some). Moreover, if $f$ were continuous at some point, $f$ would be locally bounded at this point, which is not the case. Thus $f$ is a spectacular counterexample to the converse of the intermediate value theorem.

## References

• Agboola, Adebisi. Lecture. Math CS 120. University of California, Santa Barbara, 17 December 2005.
• Conway, John H. Explanation given at Canada/USA Mathcamp, 25 July 2013.