Two Irrational Numbers From the Last Nonzero Digits of n! and nn

316
MATHEMATICSMAGAZINE
Two IrrationalNumbers Fromthe Last
Nonzero Digits of n! and nn
GREGORY P. DRESDEN
Washington & Lee University
Lexington, VA 24450
We begin by looking at the pattern formed from the last (that is, units) digit in the
base 10 expansion of n'".Since 11 = 1, 22 = 4, 33 = 27, 44 = 256, and so on, we
can easily calculate the first few numbers in our pattern to be 1, 4, 7, 6, 5, 6, 3, 6 ....
... dn... such that the nth digit dn of
We construct a decimal number N = O.dld2d3
N is the last (i.e. unit) digit of nn; that is, N = 0.14765636 .... In a recent paper [1],
R. Euler and J. Sadek showed that this N is a rational number with a period of twenty
digits:
N = 0.14765636901636567490.
This is a nice result, and we might well wonder if it can be extended. Indeed, Euler
and Sadek [1] recommend looking at the last nonzero digit of n! (If we just looked at
the last digit of n!, we would get a very dull pattern of all Os, as n! ends in 0 for every
n > 5.)
With this is mind, let's define lnzd(A) to be the last nonzero digit of the positive integer A; it is easy to see that lnzd(A) _ A/IO1 mod 10, where lOi is the largest power
of 10 that divides A. We wish to investigate not only the patternformed by lnzd(n!), but
also the patternformed by lnzd(n'2).In accordance with Euler and Sadek [1], we define
the factorial number, F = O.dld2d3... d,, . . . to be the infinitedecimalsuch thateach
digitdn = lnzd(n!);similarly,we definethe power number, P = 0.did2d3 ... d,,... by
dn = lnzd(n'").We ask whether these numbers are rational or irrational.
Although the title of this article gives away the secret, we'd like to point out that
at first glance, our factorial number F exhibits a suprisingly high degree of regularity,
and a fascinating patternoccurs. The first few digits of F are easy to calculate:
1! = 1
5! = 120
10! = 3628800
2!=2
6!=720
11!=39916800
3! = 6
4! = 24
7! = 5040
8! = 40320
9! = 362880 ...
12! = 479001600
13! = 6227020800
14! = 87178291200
Reading the underlined digits, we have
F
=
0.1264 22428 88682....
Continuing along this path, we have (to forty-nine decimal places)
F
=
0.1264 22428 88682 88682 44846 44846 88682 22428 22428 66264....
It is not hard to show that (after the first four digits) F breaks up into five-digit blocks
of the form x x 2x x 4x, where x E {2, 4, 6, 8), and the 2x and 4x are taken mod 10.
Furthermore, if we represent these five-digit blocks by symbols (2 for 22428, 4 for
Mathematical Association of America
is collaborating with JSTOR to digitize, preserve, and extend access to
Mathematics Magazine
®
www.jstor.org
319
VOL.74, NO. 4, OCTOBER2001
Likewise, working with B, we find
d = lnzd((B + 1)!) = lnzd(B!) lnzd(B + 1) _ d 2K mod 10.
- 2K) _ 0 mod 10. Since
Combining these two equations, we get d(I - K) -d(
51d, this implies that 51(1 - K) and 51(1 - 2K), which is a contradiction. Thus, there
A
can be no period XOand so F is irrational.
We now turn our attention to the power number P derived from the last nonzero
digits of nn. This part was more difficult, but a major step was the discovery that the
sequence lnzd(100100),lnzd(200200),lnzd(300300)... was the same as the sequence
lnzd(1004), lnzd(2004), lnzd(3004) .... This relies not only on the fact that 41100 but
also on the easily proved fact that ab- ab+4 mod 10 for b > 0, used in the following
lemma:
LEMMA3. Suppose 100 I x. Then, lnzd(xx) -(lnzdx)4
x=
mod 10.
Proof. As in Lemma 2, let x' denote the integer x without its trailing zeros; that is,
x/10I, where IO' is the largest power of 10 dividing x. Now,
lnzd(xx) = lnzd((10ix')1Ox')
= lnzd((l0o10Oix')(x) 1Oix')
= lnzd((x) lOx').
Since 1OXx',then lOI((x')lox', and so
lnzd(xx) _ (x')loix' mod 10.
Since 100 I x, then 4 1 10- x', and since (X')n = (X')n+4 mod 10 for every positive n,
we can repeatedly reduce the exponent of x' by 4 until we have
lnzd(xx)
(x')4 mod 10
_(lnzdx)4mod10.
U
With Lemma 3 at our disposal, the proof of Theorem 2 is now fairly easy.
Proof of Theorem2: Again, we argue by contradiction. Suppose P is rational. Let
XObe the eventual period, and choose j sufficiently large such that 10i > 200 0oand
such that
lnzd((10j + nXO)10n+fl0)
= lnzd((IOi) 1oj
for every positive n. Choosing n = 200, we get
lnzd((10j + 200XO)10+200Xo) = lnzd((10)1O ).
We reduce the left side of the above equation by Lemma 3 (note that lnzd(I0J +
200XO)= lnzd(2X0)), and the right side is obviously 1, so we have
(lnzd 2XO)4 1 mod 10
Note that lnzd(2X0) can only be 2, 4, 6, or 8, and raising these to the fourth power
mod 10 gives us the contradiction 6 = 1. Thus, P is irrational.
A