W

 Will Nicholes

Metaprimes

One day a few years ago, while waiting for my dinner, I started doodling with prime numbers, and I came across an interesting question. Here’s how it came about.

When translating a number from binary to decimal notation by hand, you add together a series of products. For example:

1110 (binary) = (16 × 1) + (8 × 1) + (4 × 1) + (2 × 0) = 28 (decimal)

Each binary digit is multiplied by a discrete value, that is, a power of 2. Naturally, each string of binary digits corresponds to a unique “real life” (i.e. decimal) number. Could there be an alternate way of “translating” these digits to express a unique product of primes?

That is, instead of each binary digit representing a power of two, it would instead represent a prime number. For example:

1110 (alt. binary) = 71 × 51 × 31 × 20 = 7 × 5 × 3 × 1 = 105 (decimal)

In this case, each string of binary digits would again correspond to a unique “real life” number. For example, if you wanted a “binary” string to express ten, you would need the prime factorization of ten:

10 (decimal) = 5 × 2 = 51 × 30 × 21 = 101 (alt. binary)

Of course, a problem arises when you try to do this for a number whose factors include a prime power greater than one. (For example, 18). One option would be to change the “binary” nature of the expression to an arbitrarily higher base, for example, ten, like so:

18 (decimal) = 32 × 21 = 21 (alt. base 10)

But of course, any number with a factor that is the tenth or eleventh power of something could not be expressed this way, so we’re back to square one.

A more satisfying approach would be to create slots for squares of primes, primes to the 4th power, primes to the 8th power, etc., so that there would be no need for a value other than 0 or 1. Therefore, in addition to having digits representing 2, 3, 5, 7, 11, etc., there would also be digits representing 4, 9, 25, 49, etc., 16, 81, 625, etc., 256, etc. and so on.

For lack of a better term, I call these numbers metaprimes. They all follow the form p2n, where p is prime and n is a non-negative integer. Here are the first few of these metaprimes: 2, 3, 4, 5, 7, 9, 11, 13, 16, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53... (True primes are in black.)

Every integer greater than 1 can be expressed as the product of these metaprimes, using each metaprime no more than once.

Using this scheme, we could represent the decimal number 120 like so:

120 = 5 × 4 × 3 × 2

Note that using metaprimes, we don’t need to use any factor more than once. If we assign each binary digit to a metaprime (right-most digit represents 2, second-right-most digits represents 3, etc.), we can continue like so:

5 × 4 × 3 × 2 = 51 × 41 × 31 × 21 = 1111 (metaprime binary)

Likewise, we could represent the decimal number 128 like so:

128 = 16 × 4 × 2 = 161 × 130 × 110 × 90 × 70 × 50 × 41 × 30 × 21 = 100000101
(metaprime binary)

Now here’s where things get interesting. These metaprime binary expressions look just like regular binary expressions, so what happens if we encode a regular decimal number into metaprime binary, then treat that result as a regular binary expression, then translate it back to decimal? For example, let’s try 18:

18 (decimal) = 91 × 70 × 50 × 40 × 30 × 21 = 100001 (metaprime binary)
 
100001 (regular binary) = 32 + 0 + 0 + 0 + 0 + 1 = 33 (decimal)

So 18 becomes 33. Let’s try it again:

33 (decimal) = 111 × 90 × 70 × 50 × 40 × 31 × 20 = 1000010 (metaprime binary)
 
1000010 (regular binary) = 64 + 0 + 0 + 0 + 0 + 2 + 0 = 66 (decimal)

So 33 becomes 66. One more time:

66 (decimal) = 111 × 90 × 70 × 50 × 40 × 31 × 21 = 1000011 (metaprime binary)
 
1000011 (regular binary) = 64 + 0 + 0 + 0 + 0 + 2 + 1 = 67 (decimal)

We can also do it in reverse. Let’s start with zero this time:

0 (decimal) = 0 (regular binary)
 
0 (metaprime binary) = 20 = 1 (decimal)

So zero becomes one. This makes sense, since 0 is considered the “additive identity” (regular binary is additive) and 1 is considered the “multiplicative identity” (metaprime binary is multiplicative.) Let’s try it again:

1 (decimal) = 1 (regular binary)
 
1 (metaprime binary) = 21 = 2 (decimal)

So one becomes two. Once more:

2 (decimal) = 10 (regular binary)
 
10 (metaprime binary) = 31 × 20 = 3 (decimal)

And two becomes three. If we keep doing this, we get the following series:

0, 1, 2, 3, 6, 12, 20, 28, 140, 260, 64, 11, 30, 420, 7488, 1922800, ...

After 1922800, the numbers grow logarithmically, approximating 253, 2125, 2413, and so on. There are a few numbers that either convert to themselves or switch back and forth, producing series like these:

4, 4, 4, 4... (binary 100)
5, 8, 5, 8... (binary 101 and 1000)
36, 36, 36, 36... (binary 100100)

However, most series spiral out to enormous values rapidly. Here are the next few:

7, 24, 35, 54, 756, 612612, 2291867200, ~264, ~2176, ~2684, ~23352, ~222464
9, 10, 15, 120, 3465, 908960, ~252
13, 40, 45, 360, 7920, 1673196525, ~2100
14, 60, 1260, 489060, ~248
18, 21, 56, 315, 30240, 65334825, ~272
19, 42, 135, 312, 5040, 5569200, ~256
22, 84, 308, 4032, 16997552, ~248

If you go in the reverse direction, the same thing happens, but quicker:

7, 16, 256, 262
9, 32, 257, 263
13, 128, 261, 8224, 263 + 257
14, 17, 512, 262 + 1
18, 33, 66, 67, 223, ~26604 (Note: 216, or 65536, seems to be the 6604th metaprime.)
19, 1024, 262 + 4
22, 65, 136, 517, 262208, ~260

(Zero is the only non-negative integer without a “reverse” counterpart in this scheme.)

If you were to graph these series, you would likely see a jerky parabola leaning to the right for most of these. Graphing the logs of the elements in the series smoothes it out some:

Metaprime chart

Here are some open questions about these series.

  • Do any of these series which include at least one “small” element (e.g. under 1000 or so) “loop back down” to connect with another such series, or are they each distinct and disconnected, diverging towards infinity at either end?
  • So far, the only cyclical series with more than one element that I’ve found is the series containing 5. Are there any others? Any that have more than two repeating elements?
  • In the typical series which y follows x, log(log(y)) / log(log(x)) seems to be around 1.3 after the first few large (> 210) elements, and decreases as the series progresses. What is the mathematical significance to this number? As this number decreases, what does it converge to?
  • Are there any practical applications to this? (I would guess not, but you never know.)

I wrote a little C++ program to help me with the elements of the series that I couldn’t easily do by hand (such as ~264), but it is slow and clunky and uses a Large Integer class I developed specifically for this problem. Sometime I may re-write it, deriving one of the better Large Integer classes out there, but probably not anytime in the near future.

Comments or questions (or answers?) E-mail me.

This page created 1/30/2003.

 

Validate this page