Even and Odd Numbers in Non-Decimal Bases
We’re probably all familiar with a simple way to distinguish even and odd numbers: in our customary base ten, all even numbers end with an even digit, and all odd numbers end with an odd digit.
Why is this so? Every positive power of ten (10, 100, 1000 . . .) is even, so the digits in those places must all represent even numbers (because any integer × even = even). Only the last digit can affect the number’s parity.
Does this work in other bases? For an even base, the answer is yes. Every positive power of the base will be even, so once again all those digits can only contribute even numbers to the total. If the number is odd, it must be because the unit digit is odd. Take, for example, the base-eight number 37 215:
84 | 83 | 82 | 81 | 80 | ||
4 096 | 512 | 64 | 8 | 1 | ||
3 | 7 | 2 | 1 | 5 | ||
12 288 | 3 584 | 128 | 8 | 5 | = | 16 013 |
even | even | even | even | odd | odd |
In an odd base, things are different. The base raised to any power will be odd (because odd × odd = odd). If the corresponding digit is also odd, then it contributes an odd number to the total. But when there is a pair of such digits, their “oddness” is cancelled out (because odd + odd = even). So if the number of odd digits is even, the total will be even. Consider the base-seven number 451 563:
75 | 74 | 73 | 72 | 71 | 70 | ||
16 807 | 2 401 | 343 | 49 | 7 | 1 | ||
4 | 5 | 1 | 5 | 6 | 3 | ||
67 228 | 12 005 | 343 | 245 | 42 | 3 | = | 79 866 |
even | odd | odd | odd | even | odd | even |
To summarize: In an even base, an odd number must end in an odd digit. In an odd base, an odd number must have an odd number of odd digits.