Odd numbers in odd bases

My wife told me about someone on the radio yesterday discussing voluntary water rationing. People in odd-numbered houses are being asked to water their yards only on odd-numbered days. This person said “I suppose they’re talking about the last digit.”

When she told me about this, my first two thoughts were:

  1. Yes, that’s what it means to be odd.
  2. Nearly every house number in suburban Houston starts with 1, so going by first digit would be a bad idea.

Strictly speaking, it’s a theorem that odd numbers are those that end in odd digits. The definition of an odd number is one that leaves a remainder of 1 when divided by 2. And in base 10, a number is odd if and only if it ends in an odd digit.

But what if you were using a base other than 10? If the base is even, then a number is odd if and only if the last digit is odd, just like base 10. But what if you’re using an odd base, say base 7? Then the theorem doesn’t hold. For example the number 122 in base 7 is odd, and the number 33 is even. And it’s not just the opposite of the rule for base 10 because 43 is also odd in base 7.

In an odd base, a number is odd iff it has an odd number of odd digits.

(In case you haven’t seen “iff” before, it’s an abbreviation for “if and only if.”)

So, for example, in base 7, the number 642341 is even because it contains two odd digits. And the number 744017 in base 9 is odd because it has three odd digits.

Why does this rule work? Suppose, for example, you have a 4-digit number number pqrs in base b where b is odd. Then pqrs represents

p b3 + q b2 + r b + s

All the powers of b are odd, so a number like p times a power of b is odd iff p is odd. So every odd digit in the number contributes an odd number to the sum that expands what the number means. Even digits contribute even terms. A sum is odd iff it has an odd number of odd terms, so a number in an odd base is odd iff it has an odd number of odd digits.

Similar posts:

13 thoughts on “Odd numbers in odd bases

  1. Side note: The most obvious case for this rule is “base 1″, where a natural number N is represented as a string of N ones.

  2. … which reminds me of an interesting pub discussion I had with some colleagues at one point. In short, is there any reason we use base 10 other than the fact we have 10 fingers? If all humans had 8 fingers would we use base 8?

    What do you think?

  3. amy (john's wife)

    Gee whiz, honey, I was just telling you about the dumb comment the newscaster made and you had to go all mathematical on me!

  4. >When she told me about this, my first two thoughts were:
    > Yes, that’s what it means to be odd.

    Give her the benefit of doubt: Perhaps she was talking about the days? Because you can either number the days again each month (last digit), or you can, say, number them continuously.

  5. jd long, base 10 vs base 8 is quite close together, so the number of fingers might have decided. But there are practical reasons why we don’t use base 2 or base 1043. The first leads to `long’ numbers, while the latter requires too many different digits.

    IMHO we should all use base 11: We can comfortable count from zero to ten on our hands. So the jump should be afterwards. Also, no matter what base you choose, some rational numbers will lead to periodic fractions. So by choosing a prime base, we reduce the prevalence of the special case of fractions with a finite representation.

  6. Excellent post, John. Educators can use this explanation but stop at the “But what if you were using a base other than 10?…” question and lead students with many questions to figure out the rest. It will make a great project or math club exercise. Thanks!

  7. A not-so-esoteric case of this was the use of bi-qinary to encode decimal digits in some early computers (e.g. IBM 650, Univac SolidState). Each digit was encoded in four bits, weighted 5421. You only had to look at the least significant digit, as a number was odd if that digit had only one of 5 or 1 set. The only other mixed-radix system I recall was the use of LSD (Pounds, Shillings, and Pence) currency encoding. For more esoteric, you’d be looking for the radix -3 machine(s?) built by the Soviets in the 1950s. Odd in may ways, but “summing odd digits” still worked.

    (Pedants: yes, the 650 used 2-of-7 coding, but was effectively bi-quinary)

  8. interestingly the rule seems to require recursive application which you don’t point out. in your example, suppose the base 7 number had 10 (base 7) odd digits. We would have to apply the rule again to determine if 10 (base 7) is itself odd.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>