Decimal Expansions of Real Numbers
We are typically introduced to decimals in elementary mathematics; for many in grade-school they
become a working definition of the real numbers. But what are they?
Definition. A non-negative decimal d
0
.d
1
d
2
d
3
· · · is an infinite series of the form
d
0
+
n=1
d
n
10
n
where d
n
N
0
and n 1 = d
n
9
Let x be a non-negative real number. Its decimal expansion D(x) is the decimal series arising from
inductively defined sequences (d
n
)
n=0
and (R
n
)
n=0
:
(
d
0
= x, d
n+1
= 10R
n
R
0
= x d
0
, R
n+1
= 10R
n
d
n+1
where we use the floor function x = max{n Z : n x}.
The decimal expansion of x < 0 is negative that of
|
x
|
= x.
Examples. 1. If x =
27
20
, then,
n 0 1 2 3 4 · · ·
d
n
27
20
= 1
70
20
= 3
10
2
= 5
0
= 0 0 · · ·
R
n
7
20
1
2
0 0 0 · · ·
Both sequences continue with zeros and we obtain the terminating decimal D(
27
20
) = 1.35.
2. If x =
1
3
, then,
n 0 1 2 3 · · ·
d
n
1
3
= 0
10
3
= 3
10
3
= 3
10
3
= 3 · · ·
R
n
1
3
1
3
1
3
1
3
· · ·
By induction, all R
n
=
1
3
and we recover the periodic decimal D(
1
3
) = 0.33333 · · · .
3. If x =
1
7
, then,
n 0 1 2 3 4 5 6 7 · · ·
d
n
0
10
7
= 1
30
7
= 4
20
7
= 2
60
7
= 8
40
7
= 5
50
7
= 7 1 · · ·
R
n
1
7
3
7
2
7
6
7
4
7
5
7
1
7
3
7
· · ·
Since R
6
= R
0
, both sequences will repeat: R
n+6
= R
n
and d
n+6
= d
n
. We recover the period-six
decimal D(
1
7
) = 0.142857142857 · · · .
In the main result, we check that the decimal expansion is well-defined and that it behaves as ex-
pected. We also give two well-known properties of decimal representations.
Theorem. Let x R
+
0
have decimal expansion D(x) =
n=0
d
n
10
n
. Then:
(a) D(x) is a decimal: each d
n
{0, 1, 2, . . . , 9} whenever n 1.
(b) D(x) converges to x.
(c) The sequence (d
n
) is eventually periodic if and only if x Q
+
0
.
(d) x equals a unique decimal series, except when D(x) = d
0
.d
1
· · · d
m
terminates (d
m
= 0). In such
a case there is a second decimal representation:
x = D(x) = d
0
.d
1
· · · d
m
= d
0
.d
1
· · · d
m1
ˆ
d
m
99999 · · ·
where
ˆ
d
m
= d
m
1. Otherwise said, we subtract 1 from the final non-zero term and insert an
infinite string of 9’s.
Examples. 1. Part (c) explains why so many people enjoy the challenge of memorizing the digits
of π: since π is irrational, the pattern never repeats.
2. Also referencing part (c), we explicitly evaluate a period-three decimal using geometric series:
3.1279279279279 · · · =
31
10
+
279
10000
n=0
1000
n
=
31
10
+
279
10000
·
1
1
1
1000
=
31
10
+
279
9990
=
1736
555
3. Here are two examples of part (d):
1 = 0.99999 · · · 27.164 = 27.1639999 · · ·
Exercises 1. Compute the decimal expansion of
32
13
.
2. Prove all parts of the Theorem. Here are some hints:
(a) Let E
n
= x
n
k=0
d
k
10
k
. Prove by induction that R
n
= 10
n
E
n
and conclude lim E
n
= 0.
(c) A decimal is eventually periodic with period r if
d
0
.d
1
· · · d
m
d
m+1
· · · d
m+r
d
m+1
· · · d
m+r
· · · =
m
k=0
d
k
10
k
+
r
j=1
d
m+j
10
mj
!
l=0
10
rl
Convince yourself that this is rational. For the converse, is x =
p
q
is rational number
observe that there are only finitely many possible values for the remainders R
n
=
a
q
.
(d) If d
0
.d
1
d
2
· · · = c
0
.c
1
c
2
· · · , let m be minimal such that c
m
< d
m
. . .
3. (a) Can you find a simple way to describe all the real numbers x for which D(x) is terminat-
ing? Prove your assertion.
(Hint: What form can the denominator of R
n
take if x =
p
q
?)
(b) Given a rational number x =
p
q
in lowest terms with q N, what is the largest possible
eventual period of D(x)? Explain.
4. Similar analyses can be done for other representations of real numbers. For instance, by replac-
ing 10 with 3 in the definition, we obtain the ternary (base-3) expansion of a real number
T(x) = [t
0
.t
1
t
2
· · · ]
3
=
n=0
t
n
3
n
where t
n
{0, 1, 2} whenever n 1
For example, [0.1]
3
=
1
3
and [0.12]
3
=
1
3
+
2
3
2
=
5
9
.
(a) Compute [0.02020202 · · · ]
3
and find the ternary representations of
1
2
and
1
5
.
(b) Read over the Theorem. How can we modify its claims for ternary representations?
(c) Describe all real numbers x whose ternary representation terminates. More generally, de-
scribe all real numbers x whose n-ary (base-n) representation terminates.
(The major take-away is that there is nothing special about base-10. Computers typically use base-2,
8 or 16; the ancient Babylonians used base-60. Modern humans likely settled on decimals because
because we’re blessed with 10 fingers. . . )