Recursive Prime Numeral System
Recursive Prime Numeral System (RPNS) comprises several methods of writing numbers based entirely on prime factorizations. It can be used to encode numbers in artistic forms, like these:
Below is an explanation of how it works.
Our base-ten numeral system represents numbers by taking powers of ten, multiplying them by various factors, and adding the results together: for example, 936 = 9 × 10² + 3 × 10¹ + 6 × 10⁰. This is good for practical calculations, but mathematically, it’s a rather arbitrary way to represent numbers. There’s nothing inherently special about ten; it’s just the number of fingers most people happen to have.
A more natural way to represent an integer is its prime factorization, a set of prime numbers raised to various powers and multiplied together: 936 = 2³ × 3² × 13¹. This is like breaking a number down into its atomic parts: for every number, there is exactly one way to break it down into primes, and this factorization gives some fundamental information about how the number behaves in various mathematical contexts.
When we write a number’s prime factorization like I did above, we still end up using base ten: in that example, 2³ × 3² × 13¹, the “13” means 1 × 10¹ + 3 × 10⁰, and even the other single-digit primes and exponents are ultimately written in base 10. RPNS is a way of writing a prime factorization without any hint of base ten or any other base: everything is written using primes.
My first thought in designing this system was that all the numbers making up the prime factorization could themselves broken down into factors: for example, if a factorization contains 13⁴, the power 4 can be written as 2². However, the 13 can’t be broken down any further into factors — that’s what it means to be prime.
But if we represent 13 using its index — 6, as it’s the 6th prime number — then we get something that can be broken down further: 6 = 2¹ × 3¹. We can continue this process by representing 2 and 3 using their indices as well:
The 2 in that expression can be broken down in the same way:
This cannot be broken down any further, as the only numbers remaining are ones.
For simplicity, I will use “A ◊ B” to represent “the Ath prime to the power of B”:
(In A ◊ B, A is the index and B is the power.)
Now that we have this expression for 6, we can use it to write 13:
A more complicated example:
It can be hard to keep track of all these parentheses, so it would be nice to have a better way to represent this information: a form of visual notation that clarifies the structure of this kind of expression. This notation will need to represent a few things:
- The number 1
- Multiplication: A × B
- The prime power operation: A ◊ B
- Some way of nesting operations, like parentheses
I have come up with several ways of doing this.
Dots & Lines
One possibility is to use horizontal and vertical lines to represent the two types of operations. Let’s write A × B as A B , and A ◊ B as A B . (Of course this looks like division, but in this context it represents something else.) Using this notation, we can write 13 like this:
The sizes of horizontal bars indicate how the parts are nested:
So if you see a horizontal bar, its inputs come from the spaces above and below the bar, up until you hit any larger bars (if you do). For example, the bar highlighted in blue here has its inputs from the shaded region:
The system can be made more concise by removing the ones and just writing the bars. This does not lead to any ambiguity: if a horizontal bar has nothing in the space above it, then the index is assumed to be 1; if it has nothing in the space below it, the power is assumed to be 1. So that above example becomes:
For aesthetic purposes, I’ll replace the shortest horizontal lines (which represent 2) with dots: . So,
To write 1 on its own, you can write a multiplication bar with nothing on either side. As with horizontal bars, the blank spaces where inputs would be are assumed to be ones, so represents 1 × 1, which is 1. (Or you can consider this to be a multiplication with no inputs, producing the multiplicative identity.)
Here are all the numbers from 1 through 1024:
It can look fun to color the parts differently:
Nested Shapes
As a review, the dots & lines representation above works like this:
- 1: a blank space
- 2: a dot
- A ◊ B: a horizontal line with A above and B below
- A × B: a vertical line with A on the left and B on the right
The nested shapes representation works like this:
- 1: a blank space
- A ◊ B: a shape enclosing A (the index) and touching B (the power)
- A × B: A and B not touching
Using this system, a number can be represented as a composition of shapes.
For some examples of how these rules work, let’s use circles labeled A and B as stand-ins for compositions that represent numbers. Here’s A × B:
There is no requirement to arrange them in any particular way — the following also represents A × B (or equivalently B × A):
Here’s one way to write A ◊ B (the Ath prime to the power of B), by drawing a shape that encloses A and touches B, indicating that A is the index and B is the power:
The particular shape used doesn’t matter — this also is A ◊ B:
Since 1 is represented by a blank space or the lack of a shape, A ◊ 1 is written as a shape enclosing A and touching nothing:
And 1 ◊ A is written as a shape enclosing nothing and touching A:
Now let’s see some actual numbers, without placeholder variables. The simplest is 2: 1 ◊ 1 is written as a shape enclosing nothing and touching nothing:
(Again, it doesn’t mean anything that I’m using a square here: what matters is the relationships between the shapes, not what the shapes are.)
As shown above, enclosing anything in a shape represents [that thing] ◊ 1, so here’s 2 ◊ 1 = 3:
The outer circle is not touching anything, so the power is taken to be 1. To write 2 ◊ 2 (= 9), make that outer circle touch a shape (any shape) representing 2:
But this composition could be ambiguous. Above I interpreted it as
- a circle,
- enclosing the index 2 (the square),
- and touching the power 2 (the semicircle),
which represents 2 ◊ 2 = 9.
However, one could also interpret it as
- a semicircle,
- enclosing the index 1 (nothing),
- and touching the power 3 (the circle around the square),
which represents 1 ◊ 3 = 8.
To avoid this kind of ambiguity, I added a rule specifying that when two shapes touch each other, the larger one contains the index, and the smaller one is the power. So for the composition above, the first interpretation (9) is correct, because the circle is larger than the semicircle. If you wanted to write 8, you would make the semicircle larger:
If more than two shapes touch each other, the largest one is taken as the shape containing the index, and all the other shapes compose the power. For an example of this, I’ll start by writing 9 again (this time using only rectangles, for variety):
To write 1 ◊ 9 (the 1st prime to the power of 9, which is 2⁹, which is 512), we can draw a bigger rectangle touching this:
Since that new rectangle is the largest shape, the stuff inside it (nothing, meaning 1) is taken to be the index, and everything it’s touching (9) is taken to be the power.
The same applies when the large rectangle is placed on the left:
Even though the rectangle on the left is smaller than the composition representing 9, it’s still the largest shape overall, so the rule still applies. And it works just as well to place that large rectangle on the right:
One more example. Here’s one way to write 6:
This is similar to how I wrote 9 earlier, but now the gap between the two parts indicates multiplication: 3 (on the left) times 2 (on the right).
To write 1 ◊ 6 (the 1st prime to the power of 6, 2⁶, 64), we can draw a bigger rectangle touching this:
In that composition the two parts of 6 are still close to each other, but they don’t have to be — below, the big rectangle is moved to the middle, with the two parts of 6 on opposite sides:
The examples above demonstrate that there are many ways to write any number — even if we’re limiting ourselves to using only rectangles. This flexibility creates room to explore different visual aesthetics. For example, here’s a set of compositions representing the numbers 2 through 29, all sized to occupy the same dimensions:
While I have been drawing all the shapes in outline, it works just as well to use solid shapes, using whatever colors you choose: