Exponential Prime Factor Trees |
10 Jun 2019 |
We usually think of the natural numbers 1, 2, 3, … as elements on a straight line that extends infinitely. That is, the relationship between 2 and 3 is the same as between 3 and 4 and so on: they have the same distance between them. In the case of a distance of 1 we might call them neighbours. This perspective focuses on the linearity and additivity of numbers: the linear distance from one number to another number can be expressed as a number. Human thinking is intuitively linear in many situations, even when that does not reflect the entire nature of the considered system. Examples include systems of exponential growth or exponential decay, or systems that involve subtle interaction among subsystems whose behaviour cannot be predicted by assuming “more of means (proportionally) more of ”.
The internal structure of the natural numbers is also far from this simple. In fact, number theory is an ancient discipline that concerns itself with understanding the nature of numbers. This often includes the study of prime numbers: every natural number is either prime or the product of multiple prime numbers. In this way the primes are a base that all other numbers are built on. We know that there are infinitely many of them, but we don’t fully understand how they work. Hence there is no known way to efficiently decide whether a number is prime or not. One inefficient method to check for this is to test for all numbers from to if is divisible by . In awkward ways like this we have found to be the largest known prime number as of January 2019. And the computers keep searching and searching for even larger prime numbers. Since there are infinitely many prime numbers, this search for the next prime number is only a matter of time, but a long time.
We could make use of numbers so much more efficiently if we understood their internal (hidden) structure better. In fact it would be advantageous to humans if we started thinking of them more in terms of their prime number structure than in a linear, additive way. To do so I suggest a tree structure, so-called exponential prime number trees. I will develop this notion here in a few steps. (To differentiate from prime factor trees, I added the “exponential”. Rather than multiplying along paths in our trees we exponentiate along them.)
The number , for example, can be decomposed into these prime factors:
Since multiplication is commutative and associative this is equal to
where the primes are grouped and sorted from small to large. Prime factors that occur more than once can be summarised with exponentiation:
Therefore natural numbers can be represented by a multi-set of prime numbers, each of them pointing to their exponent:
But if we want to express numbers purely in prime numbers, what is to be done with this “alien” number that appears inside the representation. A straightforward solution is that this number, too, gets decomposed, that is
This is a recursive step. In other words, the exponents in the multi-set representing a natural number are themselves natural numbers and can thus in turn be represented by multi-sets over prime numbers. In the interest of avoiding illegible bracketings when writing multi-sets nested within multi-sets arbitrarily deep, a tree-shaped notation is advisable. In our case:
$$19845 \equiv$$
The root has no label since it serves merely to group the top-most labelled nodes. All nodes below the root are labelled with prime numbers. So the following function reconstructs the natural number that a given prime number tree expresses. It takes a node as an input and exponentiates ’s label by the product of the values of ’s subtrees, which are calculated recursively.
If is a leaf node, since .
This way of approaching the nature of numbers opens a whole new field of possibilities for working with them. In a future post we will analyse what the consequences of this type of number representation are. How does this perspective change the relationships among numbers? What arithmetic operations can we define over numbers? What are the advantages?