Create Your Own Personal Equation!

Published on Sunday, November 25, 2012 in , , , , ,

XKCD comic #10

“...I don't write jokes in base thirteen.”
-Douglas Adams, after being told that 6 × 9 is 42 in base 13
After glancing at the post title, you're probably wondering what I mean by “your own personal equation.” I'll give you an example I created specifically for grey matters:

No, I don't expect you to do that calculation in your head. Click on that equation to have Wolfram|Alpha do the math for you.

In the area that says Result, click the Hide block form button, then click the More digits button (also under Result) 2 or 3 times.

Surprise! The answer to that math problem is:

How did I develop an equation that results in my blog's name over and over again? How can you create an equation that gives your name or other short phrases?

BASE 36?!?

If you're used to working with just the digits 0 through 9 (base 10), you might be wondering how letters can even show up as the answer to a mathematical equation.

The answer is that we're a base other than base 10. You might be familiar with base 16, also called hexadecimal, in which you count with the letters A through F, like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11...and so on.

If this talk of other number bases confuses you, take some time to read BetterExplained.com's Number Systems and Bases post and/or watch WhyU's Decimal, Binary, Octal, & Hexadecimal video. Both of these resources explain other number bases very clearly.

To be able to create a phrase using any letters (or numbers) we want, we'll need a base that uses all 10 digits plus all 26 letters, which is why we use base 36. So, the last step in our equations will always involve converting an answer to base 36.


We'll find the equation we need by working backwards. The first step is to think of a short phrase you want to use. The shorter the phrase, the smaller the resulting division problem will be. The phrase can only contain letters or numbers, with no spaces, punctuation or other characters. For an example, I'll choose the phrase greymatters, since it's my blog's name.

Go to Wolfram|Alpha, and type in a zero, followed by a decimal point, followed by your phrase repeated 2 or 3 times, followed by an underscore (_) and the number 36. Our greymatters example entry appears like this:

That underscore followed by the 36 simply tells Wolfram|Alpha that the number is to be read as base 36. The repeated use of the phrase lets Wolfram|Alpha know that this represents a repeating decimal.

When you have your entry set up like that hit enter, and Wolfram|Alpha will give you the corresponding number in base 10. If you click on the above entry, you'll see results for the example entry.

At this point, Wolfram|Alpha shows 3 “pods” (Wolfram|Alpha's term for those framed boxes) marked Input interpretation, Decimal form, and Other base conversions. All you need to focus on here is the number in the Decimal form pod. In our greymatters example, that number is:

Clicking or touching the number in the Decimal form pod makes Wolfram|Alpha use that as a new input, and it will return a fraction in the Rational approximation pod. Clicking on the decimal number above will give the fraction shown below, which you should recognize from the start of this post (I've added commas for clarity):

At this point, click or touch this fraction (the number in the Rational approximation pod) to use it as input. Click the fraction above to do this now.

All you have to do now is type the phrase in base 36 after the fraction, and then hit Enter. Check your work by clicking the Hide block form button, and then the More digits button 2 or 3 times, both in the Result pod, and making sure your chosen phrase repeats endlessly. Click the button below to see the end result:

Now try creating your own phrase in the same way. Use a friend's name, and send the Wolfram|Alpha link to them (reminding them to click on the Hide block form button, and then the More digits button 2 or 3 times in the Result pod, of course), and they'll wonder how you figured that out!


• The repeating of the phrase is very important, because otherwise the result won't necessarily have all the letters you need. If I started from the input 0.greymatters_36 (no repeat), the result I get is 0.grexum2rp5hzjk..._36, and you can see that only the first few letters were retained.

• You don't have to use base 36. Base 36 simply makes sure that every letter A through Z is available. Once you have a phrase, such as markjones, you can note that, in that phrase, the letter S is the furthest letter in the alphabet, and that it's the 19th letter of the alphabet. Add 10 (for the digits 0 through 9) to 19 to get 29, which means you can make the name markjones repeat in base 29 (or any base from there up to base 36). Just make sure you use the same base throughout the process.

• You can precede the repeating portion with a non-repeating portion. In a forum over at reddit in r/math, where I first ran across this technique, reddit user divergentdave used this tip to create this amusing phrase, which Eduard Khil fans will recognize.

Inspired by a different part of pop culture, I created an equation based on an early XKCD comic titled Pi Equals:

XKCD comic #10

The equation for this one is quite long, but it still works. Click the equation below to see the result:

If you're curious, the name of that top number is roughly 1.178 trevigintillion, a 73-digit number, while the bottom number is roughly 388 duovigintillion, 72-digit number!

Having calculated a joke in base 36, I now understand why Douglas Adams doesn't write jokes in base 13.


If you enjoyed this unusual way of coding long information with a short equation, you also might enjoy Martin Gardner's story of Dr. Zeta, and his technique for coding an entire encyclopedia with just a single mark on a rod.

The endlessly repeating messages made me think of Futility Closet's Blank Column puzzle, which you may also enjoy.

What creative phrases and uses can you come up with for this amusing and amazing technique? I'd love to hear your ideas in the comments!

Spread The Love, Share Our Article

Related Posts

Post Details

No Response to "Create Your Own Personal Equation!"