An evil number is a real number for which there is a positive
integer
such that the first
decimal digits to the right of the decimal
point in
sum to 666 (Pegg and Lomont 2004).
However, the term "evil" is also used to denote nonnegative integers that have an even number of 1s in their binary expansions, the first few of which are 0, 3, 5, 6, 9, 10, 12, 15, 17, 18, 20, ... (OEIS A001969), illustrated above as a binary plot. Nonnegative integers that are not evil in this binary sense are then known as odious numbers.
Returning to Pegg's definition of evil, the fact that is evil was noted by Keith, while I. Honig (pers. comm.,
May 9, 2004) noted that the golden ratio
is also evil. The following table
gives a list of some common evil numbers (Pegg and Lomont 2004).
| Ramanujan
constant | 132 |
| hard
hexagon entropy constant | 137 |
| 139 | |
| 140 | |
| Stieltjes
constant | 142 |
| pi | 144 |
| golden ratio | 146 |
| 145 | |
| 151 | |
| Glaisher-Kinkelin
constant | 153 |
| cube line picking average length | 154 |
| Delian constant | 155 |
Consider independent, uniformly distributed decimal digits. The probability that some finite prefix has digit
sum
tends to
as
tends to infinity. Skipping zero digits
gives independent uniform
increments from 1 to 9, so for a positive integer
the exact probability
is given by the recursive formulas
|
(1)
| |||
|
(2)
|
For , 2, ..., the first few values are therefore 1/9,
10/81, 100/729, 1000/6561, ... (OEIS A100061
and A100062; Pegg and Lomont 2004), plotted
above.
The generating function is given by
|
(3)
|
(Pegg and Lomont 2004). This allows an expression for to be determined in closed form,
although it is a complicated expression involving combinations of the algebraic
numbers (and polynomial roots)
for
,
..., 8.
For the case of interest (), the result is a rational
number having a 635-digit numerator and a 636-digit
denominator that is approximately
equal to
|
(4)
|
A set of "beastly evil" numbers are given by the following (M. Hudson, pers. comm., Nov. 5-10, 2004).
| number | digits |
| 74 | |
| 74 | |
| 136 | |
| 142 | |
| 146 | |
| 147 | |
| 149 | |
| 152 | |
| 156 | |
| 159 | |
| 163 | |
| 468 | |
| 655 |
Powers of that are evil include
, 6, 8, 10, 17, 18, 24, 25,
26, 29, 30, 38, ... (M. Hudson, pers. comm., Nov. 8, 2004).
The analogous problem of terms in a simple continued fraction summing to a given number can also be considered. The following table summarizes some constants whose continued fractions have cumulative sums that equal 666 (Pegg and Lomont 2004).
| constant | terms |
| cube line picking average length | 50 |
| pi | 56 |
| conjectured value of Bloch constant | 58 |
| Gauss's constant | 143 |
| 167 | |
| conjectured value of Landau constant | 173 |
Interestingly, this makes the cube line picking average length and doubly
evil.