Tag: base n

  • Can every number be written as a palindrome in some base?

    Can every number be written as a palindrome in some base?

    My muse, Bartholomew, visited me this weekend with a question:

    Can every number be written as a palindrome in some base?

    What’s that mean!?

    Okay — first thing’s first. A palindrome is something that can be written the same way forward as backward. Like mom or 1001. Typically we ignore punctuation, so things like, “Go hang a salami, I’m a lasagna hog,” also count as a palindrome.

    And base means the number system — in our normal world we use base 10. Computers use base 2 (all ones and zeros) and hexadecimal (like the color codes you sometimes see on a computer — hex #ff9900 is the MathFour orange).

    Notice in hexadecimal — using 16 digits — we have to use letters as numbers. I did a video on base 12 arithmetic here — base 12 also uses some letters as numbers.

    So what’s the question again?

    Take any number — say 85. Can you convert it to some other base (like base 2 or base 7 or base 61) so that it looks like a palindrome?

    You can work hard converting numbers — or you can have a spreadsheet or Wolfram Alpha do it for you.

    If you use Wolfram Alpha, put in the statement “convert NUMBER base 10 to base NEW_BASE” — change the blue things, but leave the black ones the same.

    Notice if you convert 85 base 10 to base 84, the result is 1184 — which means every number can be written as a palindrome in the base that is one less than it.

    So 27810 is 11277. And 11 is a palindrome!

    So yes — every number can be written as a palindrome in some base.

    That’s a lame answer!

    You’re right. That’s what mathematicians call a “trivial” solution. It’s true, but it’s pretty lame.

    So let’s rewrite the question to be more interesting.

    Can every number be written as a palindrome in a base less than or equal to 10?

    This lets us use our “normal” digits — and it makes it more natural.

    I put together a spreadsheet to calculate some conversions. The yellow highlights are palindromes. The blue rows — those have no palindromes!

    Not every number can be written as a palindrome!

    That answers the question — but any good mathematician will ask the next question:

    What’s up with the numbers that can’t be written as palindromes?

    I did up to 100 and these numbers didn’t have palindrome conversions:

    19
    25, 29
    39
    47
    53, 58, 59
    69
    75, 76, 79
    84, 87
    90, 94, 95, 96

    Some are primes, some not. One’s even a perfect square!

    I leave the question with you…

    Any thoughts? What happens if you change the question again? Can you ask your children this question?

    Share in the comments — and don’t forget to tweet it!

    You might also like:
  • How to Add and Multiply in Base 12

    How to Add and Multiply in Base 12

    In the previous post, I explained some basics about base 12 counting. Since you’re back, clearly you’re a glutton for punishment (or your Algebra book is requiring you to do this).

    Either way, here’s how to add in base 12:

    And how to multiply:

    I cheated a little here here, because to me this is the easiest way. If you need an example or two to do it “right,” post it in the comments and I’ll do a few for you.

    A big thanks goes out to Kellie for the question.

  • What Base 12 Means

    What Base 12 Means

    Algebra books seem to believe that base 12 is a good idea for humans to use. This is only in the case of that pianist in GATTACA that has 12 fingers. We have a base 10 system because we have 10 fingers. (This is why you’re allowed to count and do arithmetic on your hands.)

    Regardless of the general uselessness of a base 12 system, working with it is a good exercise in patience, alternate thinking and puzzle solving.

    Here’s how to “count” in base 12:

    But what if you want to get higher than you can count? For instance, what if some algebra book asks, “What’s after EE012?”

    Now check out how to switch a base 10 number (which is our way) into a base 12 number:

    Want more? Check out how to add and multiply in the next post.

    Thanks to Kellie for the inspiration for this post.

  • How to Calculate the Weight of Cannon

    How to Calculate the Weight of Cannon

    I was at the Houston Museum of Natural Science last Saturday at the Real Pirates exhibit. Here’s the fun math thing I learned:

    Post your thoughts in the comments.