Something old and something new collided last week in a way that I found very engaging. The old was a science fiction series I read long ago, the Heechee saga by Frederik Pohl (1919-2013). What’s relevant here is that the alien Heechee used a number system based on prime numbers.
The new was this recent Substack post by Richard Green, a math writer and teacher. It, too, features a system based on primes, and I realized it solves a problem that has long bothered me about the putative Heechee number system.
Let me explain…
At risk of boring some readers, let’s review the ideas behind prime numbers:
An integer is prime if it can only be divided by itself and one. Seven is prime because it can only be divided by one and seven. Eight is not prime because it can be divided by two (giving four, which can also be divided by two).
Eight breaks down to 2 × 2 × 2 — its prime factors. So, integers divide into two types: prime numbers (like two, three, five, and seven) and composite numbers (like four, eight, ten, and sixteen) that are products of prime numbers.
In this context, the number one is considered “special” and is neither prime nor composite (likewise, zero). Real numbers include the integers, so real numbers include the prime integers. Rational numbers are prime if their numerator and denominators are prime (½ is prime, ¼ is not) — this obviously includes the integer primes, such as 7/1.
The key point is that composite integers (such as 100) always break down into their prime factors (in this case, 2 × 2 × 5 × 5).
A second key point is that each prime number in an ordered list of prime numbers has an index (aka ordinal) number:
- 2
- 3
- 5
- 7
- 11
- 13
- 17
- 19
- 23
- 29
- 31
- 37
- …
23 is the 9th prime number. This becomes hugely important later.
Note that, as Euclid proved long ago, the list of prime numbers is infinite.
§
This brings us to the Heechee, an ancient alien race that visited Earth long ago and left behind a hollowed-out asteroid filled with seemingly abandoned — but fully working — alien spaceships. A major problem, though, is how to work them. Labels, maps, and documents are in an alien language, and the indicator color schemes are equally alien.
The first book of the saga, Gateway (1977), won Hugo, Locus, Nebula, and John W. Campbell awards for best novel. The sequels, to some extent, are more of the same, but that first novel has long been among my favored and talked about stories.
Among the many things that stuck with me from that book is the Heechee number system, which is based on primes and factors of primes (composites). The idea seemed to be that their number symbols were the primes, and composites were just multiple prime symbols. I wrote about this in some detail back in 2015 (expanding on a brief mention at the end of a post in 2014).
As I thought about it over the years, I saw a very minor issue, a slightly less minor pair of issues, and a vexing issue. The last one to me almost seemed a showstopper.
The very minor issue is the order of primes. The number 10 could be expressed as either 2×5 or 5×2. Or in terms of the symbols in the 2015 post, either ⊩⋑ or ⋑⊩ (because ⊩ is 2 and ⋑ is 5). Multiplication products are commutative, so the order doesn’t matter. As I suggested in that same post, they may have a convention, say lowest-to-highest.
The two less minor issues are how to represent 0 and 1, neither of which are primes or composites. One assumes they would have special symbols for these values (in the “Heechee” system I’m about to show you, I decided on Ø for zero and ▂ for one).
The vexing issue involves the infinity of prime numbers. Basing a number system on primes seems to imply an infinite number of distinct symbols for those primes. How can even as advanced a civilization as the Heechee were work with a system involving an infinite number of symbols?
§
I’d like to claim I got as far as recognizing it would require a construction protocol for creating prime symbols. That would allow creating the symbol for any given prime.
What’s needed is something akin to how we construct the natural numbers. We begin with two axioms: the number zero (in some accounts, the number one) and a successor function, S(x), which given a number x returns the next number (x+1). So, zero is 0, one is S(0), two is S(S(0)), three is S(S(S(0))), and so on. We thus have a protocol for constructing any natural number.
Had I recognized this necessity for the Heechee prime numbers, I might have figured out something, might have gotten on the right track. As it was, I just thought, “How do they deal with infinite primes?”
It’s science fiction, so a possible answer is “they don’t” — same as the current answer to warp drive, blaster pistols, and transporters. Perhaps, had it been a real-world problem, something I was confident actually existed, I might have given it more thought.
Regardless, ever since, it was one of those tiny little back-of-the-mind questions that popped up anytime the subject did (which wasn’t all that frequently).
§
Then I read Richard Green’s post, and a lightbulb went on. It described exactly what was needed: a protocol for constructing prime number symbols. And once we have those symbols, composite numbers are just a matter of combining the necessary prime symbols.
The post describes an arΧiv pre-print paper, Une remarque sur l’arborification de Matula (A Note on Matula’s Arborification), by French mathematician Dominique Manchon.
Matula arborification, introduced it in 1968 by David W. Matula, is a method for representing natural numbers as rooted forest graphs.
In graph theory, a tree is a type of graph where the nodes (aka vertices) are connected such that there is ever only one path between any two nodes. A rooted tree has one vertex designated as the root node. A rooted forest is a set of one or more rooted trees.
Below on the left, a rooted forest (the Matula arborification of the number 2001, notated as 𝒜(2001)), on the right, a single tree, the arborification 𝒜(2003):

Here’s a look at arborifications of the numbers 2 through 12:
I’ve added two wrinkles: Firstly, I join forests together with a horizonal base line. Secondly, I draw a short horizontal base line through the bottom dot of the prime dot patterns. I’ll explain this below.
One thing immediately stands out: the prime numbers have a single root whereas the composite numbers have multiple roots. Compare the two-dot pattern for 3 with the same pattern appearing twice in the pattern for 9 (because 9 = 3 × 3).
Incidentally, squares and cubes stand out because they feature two or three copies of the same prime. Nine is also 3², and its pattern reflects that.
See also how the pattern for 2 (which is prime) is repeated in the patterns for 4 (2²) and 8 (2³).
The pattern for 6 is 2 × 3, the pattern for 10 is 2 × 5, and the pattern for 12 is 2 × 2 × 3.
So, the pattern for any composite number is the patterns of its prime factors (ordered lowest-to-highest). All that remains is how we construct the prime number patterns.
Here are the first twelve prime patterns:
Each has a single root, of course. The pattern above that single root dot is its own number. For instance, the two dots above the single 7-dot are the pattern for 4, and 7 is the fourth prime. The three dots above the 13-dot are the pattern for 6 (2 × 3), and 13 is the sixth prime.
The number pattern above a single dot is the ordinal number of the prime.
That it. That’s the construction protocol. Let’s use it to construct some of the primes above:
2: Here we define 1 as “empty” or “null”. What’s above the 2-dot? Nothing, null, emptiness. Which means 1. Or more correctly since it’s an ordinal number: first. Two is the first prime.
3 is the second prime, and above the 3-dot is the pattern for 2.
5 is third and has the pattern for 3 above it. Note the recursion: 5 is defined by 3, which is defined by 2 (which is defined by 1).
7 is fourth and has the dot pattern for 4 above it.
11 is fifth and has the pattern for 5 above it.
13, also mentioned, has the dot pattern for 6 above it; 17 has the pattern for 7; 19 has the pattern for 8; and so on to 37, which has the pattern for 12 above it (2 × 2 × 3).
One consequence of this system is that the patterns can grow both vertically and horizontally. For instance, here is the Heechee symbol for one million (2 × 2 × 2 × 2 × 2 × 2 × 5 × 5 × 5 × 5 × 5 × 5 aka 2⁵ × 5⁵):

There are also the “towers” of dots seen in the patterns for 3, 5, 11, and 31 above. These continue indefinitely, although the numbers get large fast:

The next two are 648,391 and 9,737,333. The next one would be whatever the 9,737,333rd prime is.
I suspect the Heechee would have a shorthand form to compress long chains of dots both horizontally (perhaps some form of exponential notation) and vertically.
§
Now let’s take another look at the lede image, the “Heechee” number for 2026. I’ve annotated it to help make clear how the value is derived.
Start with the baseline across the bottom. It has more than one dot, so the number the pattern represents is not prime but consists of two primes multiplied together.
The first is good old easy-to-recognize 2. Top dots in any tree are always 2. The second prime is a tree.
As always, primes are represented by a single dot with the pattern above being its ordinal number. The pattern above our second prime looks a bit involved, but it’s fairly easy to unpack.
This prime root dot has three dots above, so these are prime factors. We can immediately recognize the 2 on the left. The 5 in the middle should be familiar, too (5 is the third prime; 3 is the second prime). On the right, the two 2s on the top have the value 4, so the single dot below them represents 7, the fourth prime. The dot below that, then, is the seventh prime, 17.
So, we have 2 × 5 × 17 = 170, which means the dot below is the 170th prime: 1013.
Lastly, we multiply 2 × 1013 to get 2026.
§
And that’s it. The Matula arborification of the natural numbers (plus a few wrinkles like zero and one and possibly a shorthand for repeated patterns) are the sort of thing the Heechee might use.
Matula’s PhD student Zizhen Chen created an online tool you can use to create Matula arborifications of numbers:

His added wrinkle is a root node for forests (rather than the horizontal line I use). That’s a better formalization of the concept. He also puts the root at the top.
I wanted to leave you with the first 100 “Heeche numbers” but cutting and pasting the individual images is tedious and taking too long, so here’s the first 50:
You can find many more listed in the French paper.
§ §
While I’ve decided to leave Substack (more on that another time), I very much enjoy (and will continue to read) Richard Green’s blog, A Piece of the Pi. Highly recommended for any math fans.
This is actually the third time one of his posts has inspired a project. A while back his post about Tredoku puzzles inspired a Sudoku/Tredoku puzzle solver [see this programming post from last year].
More recently, his post about modular stitching resulted in some coding, some neat images, and this post from late last year.
Stay prime, my friends! Go forth and spread beauty and light.
∇















And what do you think?