‘

Every Fifth^{1} Real Number is Evil Doron ZEILBERGER

In fond memory of my beloved cousin Matti Weiss (1945-2025) who ignited my love of mathematics

Abstract: Fifteen years ago, then-Carleton-undergrad, Isaac Hodes, proved that the Golden Ratio is evil. In this modest contribution to human knowledge, we show that in fact, every fifth real number is evil, and we present lots of other interesting numbers that are evil. We also show (in addition to many other fascinating facts), that the expected evil-location of a random evil number is 148.185185185185185 …. It follows that the Golden Ratio is a fairly average evil real number, since, as first computed by Hodes, its evil location is 146.

Maple package: This article is accompanied by a Maple package Hodes.txt, available from

http://sites.math.rutgers.edu/~zeilberg/tokhniot/Hodes.txt .

The front of this article

https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/hodes.html ,

contains numerous output files, some of which will be referred to later.

Original Definition: ([H]) A real number is evil if the sequence of digits in its decimal representation to the right of the decimal point (in other words, its fractal part) has the property that one of its partial sums is the satanic number 666.

Hodes[H] showed that, according to his definition, the golden ratio \frac{1+\sqrt{5}}{2}, is evil, and the evil location is 146, i.e. the sum of the first 146 digits after the decimal point equals 666.

But Hodes’ definition is unfair to the digits to the left of the decimal point. Also it is decimalcentric, dependent on the contingent fact that we humans have ten fingers. Also there are lots of other definitions of being evil . For example mine is 359 (the gematria value of satan ([shin, tet, nun]). Of course 13 is a famous one. 666 is the Gematria value of “Emperor Neron” ([nun, resh, vav,nun], [kuf,samech, resh]).

A more satisfactory and general definition is the following.

My Definition of Evil Real Number: A real number is n-evil to base b if removing the decimal point (more generally: the base b ‘point’), one of the partial sums of its sequence of digits equals n.

Note that according to my definition, the Golden Ratio ϕ, is not evil, but ϕ − 1 = \frac{\sqrt{5}−1}{2} is.

It turns out that the Golden Ratio ϕ (or according to our definition ϕ − 1) is not that special, and we have the following. every 5.000000000000000000000000000000000000000000000000000000000000005415558-th real number 1 Fact: The probability that a random real number (in base 10) would have one of its partial sums equal to 666 is exactly

1 More precisely:

0.19999999999999999999999999999999999999999999999999999999999999978337773162864760552794625 ….

It follows that one in every

5.0000000000000000000000000000000000000000000000000000000000000054155 …

real numbers is evil. Let me explain.

Probability Generating Functions

Theorem 1: Let a_{b}(n) be the probability that a uniformly-at-random string of members of {0, 1, …, b − 1} that definitely starts with a non-zero entry, has one of its partial sums equal to n. We have the following generating function, let’s call it h_{b}(x):

h_{b}(x) := ∑_{n=0}^{∞} a_{b}(n) x^{n} = 1 + \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} + \frac{(−1 + x^{b−1})^{2} x^{2}}{(−bx + x^{b} + b − 1) (b − 1) (1 − x)} .

In fact we have more generally:

Theorem 2: Let A_{b}(n, k) be the probability that a random real number in base b has its k-th partial sum equal to n (for the first time). We have the following bivariate generating function, let’s call it H_{b}(x, t):

H_{b}(x, t) := ∑_{n=0}^{∞} ∑_{k=0}^{∞} A_{b}(n, k) x^{n} t^{k} = 1 + \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} t + \frac{(1 − x^{b−1})^{2} x^{2}t^{2}}{(t x^{b} − bx + b − t) (b − 1) (1 − x)} .

Proof: The probability generating function of a single digit (assuming a fair die) is

\frac{1}{b} · ∑_{i=0}^{b−1} x^{i} = \frac{1 − x^{b}}{b(1 − x)} .

By fiat, the first digit is non-zero, so the probability generating function of the very first digit is:

\frac{x + x^{2} + … + x^{b−1}}{b − 1} = \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} .

If k is the location where, for the first time, the partial sum of the (uniformly-at-random) string of members from {0, 1, …, b − 1} equals n, that digit must be non-zero. But a-priori 0 is allowed, so the probability generating function for that k^{th} digit is:

\frac{x + x^{2} + … + x^{b−1}}{b} = \frac{x(1 − x^{b−1})}{b (1 − x)} .

Hence the probability generating function that the k-th partial sum would equal to n for the first time is

\frac{x(1 − x^{b−1})}{(b − 1) (1 − x)} · (\frac{1 − x^{b}}{b(1 − x)})^{k−2} \frac{x(1 − x^{b−1})}{b(1 − x)} .

Hence the desired bivariate probability generating function is

H_{b}(x, t) = 1 + \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} t + ∑_{k=2}^{∞} \frac{x(1 − x^{b−1})}{(b − 1) (1 − x)} · (\frac{1 − x^{b}}{b(1 − x)})^{k−2} \frac{x(1 − x^{b−1})}{b (1 − x)} t^{k}

= 1 + \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} t + t^{2} \frac{x(1 − x^{b−1})}{(b − 1) (1 − x)} (1 − \frac{1 − x^{b}}{b(1 − x)} t)^{−1} \frac{x(1 − x^{b−1})}{b (1 − x)}

= 1 + \frac{x(1 − x^{b−1})}{(b − 1)(1 − x)} t + \frac{(1 − x^{b−1})^{2} x^{2}t^{2}}{(t x^{b} − bx + b − t) (b − 1) (1 − x)} .

Plugging-in t = 1 in Theorem 2 gives Theorem 1.

This is implemented in procedures Gxr(x,r) and Gxtr(x,t,r) in the Maple package Hodes.txt .

In particular, for base 10, we have that the probability that a random real number would have one of its partial sums equal to 666 is the coefficient of x^{666} in the Maclaurin expansion of

−\frac{9}{x^{9} + x^{8} + x^{7} + x^{6} + x^{5} + x^{4} + x^{3} + x^{2} + x − 9} ,

that happens to be the number mentioned above.

Automatic Generation of moments

We are interested in the random variable ‘evil-location’ in the sample space of all n-evil numbers in base b. Using partial fractions and Maple, one can obtain very precise asymptotic expressions not only for the (conditional on being evil) expectation, and variance, but as many moments as one desires (we went up to 16-th, but one can easily go further). In order to get the generating function of the i-th moment, Maple computed, (t\frac{d}{dt})^{i}H_{b}(x, t)|_{t=1}, a certain rational function of x whose denominator can be factored as (1−x)^{i+1}Q(x) where all the roots of Q(x) have absolute value larger than 1. Then we (or rather Maple) converted it to partial fractions using convert(f,parfrac), and then extracted the coefficient of x^{n} in the Maclaurin expansion, ignoring the exponentially decaying terms. Once we had the moments, we got the central moments, E[(X − μ)^{i}], once again thanks to Maple. From this, in turn, one can get the scaled moments, take the limit, and verify asymptotic normality for as many moments as desired.

We have Theorem 3:

(i) The expected evil-location of a base b random n-evil real number is

\frac{2}{b − 1} · n + \frac{b − 5}{3(b − 1)} + O(α_{b}^{n}) ,

where 0 < α_{b} < 1. (When b = 10 and n = 666 we get \frac{2}{9} ·666+ \frac{10}{27} = 148.1851852 . . .. This differs by 8.054743192×10^{−62} from the exact value!) (ii) The variance of the evil-location of a base b random n-evil real number is

\frac{2(b + 1)}{3 (b − 1)^{2}} · n + \frac{2b^{2} − 14b + 2}{9 (b − 1)^{2}} + O(α_{b}^{n}) .

(iii) The third central moment of the evil-location of a base b random n-evil real number is

\frac{2 (b + 1)^{2}}{3 (b − 1)^{3}} · n + \frac{2 (b + 1) (11b^{2} − 95b + 11)}{135 (b − 1)^{3}} + O(α_{b}^{n}) .

It follows that the skewness (scaled central third moment) tends to 0 as n goes to infinity. (iv) The fourth central moment of the evil-location of a base b random n-evil real number is

\frac{4 (b + 1)^{2}}{3 (b − 1)^{4}} · n^{2} + \frac{2 (b + 1) (13b^{2} − 30b + 13)}{15 (b − 1)^{4}} · n + \frac{2 (17b^{2} − 11b + 17) (b^{2} − 10b + 1)}{135 (b − 1)^{4}} + O(α_{b}^{n}) .

It follows that the kurtosis (scaled central fourth moment) tends to 3 as n goes to infinity.

(v) The fifth central moment of the evil-location of a base b random n-evil real number is

\frac{40 (b + 1)^{3}}{9 (b − 1)^{5}} ·n^{2}+\frac{10 (31b^{2} − 118b + 31) (b + 1)^{2}}{81 (b − 1)^{5}} ·n+\frac{2 (b + 1) (293b^{4} − 4291b^{3} + 7356b^{2} − 4291b + 293)}{1701 (b − 1)^{5}}+O(α_{b}^{n}) .

It follows that the scaled central fifth moment tends to 0 as n goes to infinity. For the remaining central moments up to the 16-th see the output file:

http://sites.math.rutgers.edu/~zeilberg/tokhniot/oHodes6.txt .

We are happy to report that the limits of the scaled moments approach those of the Gaussian distribution, hence ‘location of evil-location’ over random evil numbers (in any base!) is asymptotically normal (at least up to the 16-th moment).

Lots and Lots of Evil Numbers

It is universally believed, but no one has any clue how to prove it, that every naturally occurring irrational real number, like \sqrt{2}, π, e, and of course, the golden ratio, are normal. This means that they behave, statistically, like random real numbers. The only currently proved normal real numbers are the (base-dependent) Champernowne’s constant, and the non-computable Chaitin constants (see [W]).

Assuming the normality hypothesis, we should expect that the percentage of evil numbers among the first 100000 prime multiples of π should be close to %20, and the expected evil-location close to 148.185. This turned out to be true. The output file

https://sites.math.rutgers.edu/~zeilberg/tokhniot/oHodes7b.txt, lists which primes p,

amongst the first 100000, (from 2 to 1299709), are such that p · π is evil, along with their respective evil locations. We found out that .2010500000 of them are evil, and the average of their evil-locations is 148.6589406.

For numbers of the form π\sqrt{x}, for 1 ≤ x ≤ 10000 the ratio is .2045000000, see the output file:

https://sites.math.rutgers.edu/~zeilberg/tokhniot/oHodes2.txt .

We also explored other bases, see the front of this article:

https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/hodes.html ,

for a few more output files, but you are welcome to explore your own favorite numbers, once you downloaded Hodes.txt .

References

[H] Isaac Hodes, The golden ratio is evil, posted Aug. 24, 2010

https://isaachodes.io/p/the-golden-ratio-is-evil/ .
[W] Wikipedia, Normal Number, https://en.wikipedia.org/wiki/Normal number .

Doron Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen Rd., Piscataway, NJ 08854-8019, USA. DoronZeil@gmail.com Oct. 4, 2025