# [seqfan] Representation of real numbers by sequences

Oscar Cunningham mail at oscarcunningham.com
Mon May 18 10:32:49 CEST 2020

```I recently wrote a blog post
(https://oscarcunningham.com/494/a-better-representation-for-real-numbers/)
in which I described a method for representing real numbers as integer
sequences.

In brief, we define the function g by g(x) = x/(x+1), and then write a
number in the form z+g(a_0+g(a_1+g(a_2+g(...)))), where z is an integer
and a is a sequence of natural numbers.

This representation is similar to the continued fraction, but improves
on it in two ways.

The first is that there is no nonuniqueness of representations. Each
real number corresponds to a distinct sequence, and each sequence
corresponds to a distinct number. The second is that the map is
order-preserving (unlike continued fractions, in which increasing the
terms in odd positions decreases the number). We still retain the nice
properties of continued fractions of rational and quadratic roots.

More formally we have:

a) The representation defines an order-preserving bijection between the
interval [0,1) and the set of functions from natural numbers to natural
numbers (with the lexicographic order).

b) The representation of x is eventually all 0s if and only if x is
rational.

c) The representation of x is eventually periodic if and only if x is

There has also been some interesting discussion of this blog post on
reddit