In mathematics, and more particularly in number theory, primorial, denoted by "#", is a function from natural numbers to natural numbers similar to the factorial function, but rather than successively multiplying positive integers, the function only multiplies prime numbers.
The name "primorial", coined by Harvey Dubner, draws an analogy to primes similar to the way the name "factorial" relates to factors.
For the nth prime number pn, the primorial pn# is defined as the product of the first n primes:
where pk is the kth prime number. For instance, p5# signifies the product of the first 5 primes:
The first five primorials pn# are:
The sequence also includes p0# = 1 as empty product. Asymptotically, primorials pn# grow according to:
where o( ) is Little O notation.
In general, for a positive integer n, its primorial, n#, is the product of the primes that are not greater than n; that is,
where π(n) is the prime-counting function (sequence A000720 in the OEIS), which gives the number of primes ≤ n. This is equivalent to:
For example, 12# represents the product of those primes ≤ 12:
Since π(12) = 5, this can be calculated as:
Consider the first 12 values of n#:
We see that for composite n every term n# simply duplicates the preceding term (n − 1)#, as given in the definition. In the above example we have 12# = p5# = 11# since 12 is a composite number.
Primorials are related to the first Chebyshev function, written ϑ(n) or θ(n) according to:
Since ϑ(n) asymptotically approaches n for large values of n, primorials therefore grow according to:
The idea of multiplying all known primes occurs in some proofs of the infinitude of the prime numbers, where it is used to derive the existence of another prime.
Primorials play a role in the search for prime numbers in additive arithmetic progressions. For instance, 2236133941 + 23# results in a prime, beginning a sequence of thirteen primes found by repeatedly adding 23#, and ending with 5136341251. 23# is also the common difference in arithmetic progressions of fifteen and sixteen primes.
Every highly composite number is a product of primorials (e.g. 360 = 2 × 6 × 30).
Primorials are all square-free integers, and each one has more distinct prime factors than any number smaller than it. For each primorial n, the fraction φ(n)/n is smaller than for any lesser integer, where φ is the Euler totient function.
Any completely multiplicative function is defined by its values at primorials, since it is defined by its values at primes, which can be recovered by division of adjacent values.
Base systems corresponding to primorials (such as base 30, not to be confused with the primorial number system) have a lower proportion of repeating fractions than any smaller base.
Every primorial is a sparsely totient number.
The n-compositorial of a composite number n is the product of all composite numbers up to and including n. The n-compositorial is equal to the n-factorial divided by the primorial n#. The compositorials are
The Riemann zeta function at positive integers greater than one can be expressed by using the primorial function and Jordan's totient function Jk(n):
|pn# + 1||pn# − 1|