We can define something similar to the factorial function, , for prime numbers. This is known as the "primorial" function and it written as . It is defined by
The first few values are:
They have an interesting property involving Euler's Totient function:
The second follows from the definition of the totient function while the third follows from the prime number theorem. What this means, essentially, is that the totient density of primorials is strictly decreasing to zero. Let me explain.
Primorials are important because they essentially "sieve" through prime numbers. For example, every prime number can also be written in the form of . Likewise, they can be written in the forms . This continues for all other primorials.
But what's so special about those? We can also write primes as , and so on. What's really important is minimizing the number of residue classes we have. In this light, we can imagine that there are some numbers which work better than others. For example, the prime number residue classes of are . So we could write prime numbers in the form of , but why bother when we can write them as and reduce the total number of residue classes from to ?
This is where the term comes from in the equation above. It measures the number of residue classes of relative to its size. Primorials are important because they optimize this measure and occupy its minimum values.
A unique application of primorials is in calculating heuristics about the gaps between prime numbers. I'll develop this fully in a later note, but the general argument is as follows:
Take a prime number of the form and write out the next prime that comes after it. There are 4 possibilities:
The gap is divisible by in all cases, which is a trivial fact. In half of the cases, it is divisible by . If we look at larger residue classes, we find that gaps are divisible by in a third of cases and so on. Assuming that s is minimal (looking only at twin primes, cousin primes, and sexy primes), we can also use this heuristic to state that sexy primes (prime pairs with a gap of ) are about twice as common as twin and cousin primes (those with gaps and , respectively).