# [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
{"ft_lang_label":"__label__en","ft_lang_prob":0.8879566,"math_prob":0.96707267,"size":1781,"snap":"2020-34-2020-40","text_gpt3_token_len":435,"char_repetition_ratio":0.14406303,"word_repetition_ratio":0.031007752,"special_character_ratio":0.22459292,"punctuation_ratio":0.11504425,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9759133,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-26T03:09:51Z\",\"WARC-Record-ID\":\"<urn:uuid:c8878cf5-1567-40c5-b792-015e03722b66>\",\"Content-Length\":\"5175\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5c2d8433-f749-4ab5-87b5-777c32dfff56>\",\"WARC-Concurrent-To\":\"<urn:uuid:67f2853b-ae43-4dcd-9e67-9a1f75f15850>\",\"WARC-IP-Address\":\"92.243.17.179\",\"WARC-Target-URI\":\"http://list.seqfan.eu/pipermail/seqfan/2020-May/020725.html\",\"WARC-Payload-Digest\":\"sha1:6N4GQXTNR2FP65HU75MHWO4GCGIGM6QU\",\"WARC-Block-Digest\":\"sha1:7JJBEQIZWE2RESXNIW4ETMNT4WGZJT6W\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400232211.54_warc_CC-MAIN-20200926004805-20200926034805-00149.warc.gz\"}"}