Evil Number Calculator

Enter a number to check if it's an evil number, or specify a range to generate all evil numbers within it.

Evil Number Check or Generate

What Is an Evil Number?

An Evil Number is an integer whose binary representation contains an even number of \( 1s \). For example, the binary representation of 5 is \( 101 \), which contains two \( 1s \), making 5 an evil number. Conversely, a number with an odd number of \( 1s \) in its binary representation is called an Odious Number.

How to Determine if a Number Is Evil

  1. Convert the number to its binary form.
  2. Count the \( 1s \) in the binary representation.
  3. If the number of \( 1s \) is even, the number is evil.

Examples

Example 1: Is 10 an Evil Number?

Solution:

1. Binary Representation:

10 in binary is 1010.

2. Count of \( 1s \):

There are 2 \( 1s \).

3. Result:

Since 2 is even, 10 is an evil number.

Example 2: Is 1666 an Evil Number?

Solution:

1. Binary Representation:

1666 in binary is 11010000010.

2. Count of \( 1s \):

There are 4 \( 1s \).

3. Result:

Since 4 is even, 1666 is an evil number.

Example 3: Is 2024 an Evil Number?

Solution:

1. Binary Representation:

2024 in binary is 11111101000.

2. Count of \( 1s \):

There are 7 \( 1s \).

3. Result:

Since 7 is odd, 2024 is not an evil number.

First 100 Evil Numbers

  • 3
  • 5
  • 6
  • 9
  • 10
  • 12
  • 15
  • 17
  • 18
  • 20
  • 23
  • 24
  • 27
  • 29
  • 30
  • 33
  • 34
  • 36
  • 39
  • 40
  • 43
  • 45
  • 46
  • 48
  • 51
  • 53
  • 54
  • 57
  • 58
  • 60
  • 63
  • 65
  • 66
  • 68
  • 71
  • 72
  • 75
  • 77
  • 78
  • 80
  • 83
  • 85
  • 86
  • 89
  • 90
  • 92
  • 95
  • 96
  • 99
  • 101
  • 102
  • 105
  • 106
  • 108
  • 111
  • 113
  • 114
  • 116
  • 119
  • 120
  • 123
  • 125
  • 126
  • 129
  • 130
  • 132
  • 135
  • 136
  • 139
  • 141
  • 142
  • 144
  • 147
  • 149
  • 150
  • 153
  • 154
  • 156
  • 159
  • 160
  • 163
  • 165
  • 166
  • 169
  • 170
  • 172
  • 175
  • 177
  • 178
  • 180
  • 183
  • 184
  • 187
  • 189
  • 190
  • 192
  • 195
  • 197
  • 198
  • 201