From Wikipedia, the free encyclopedia
  (Redirected from Primorials)
Jump to: navigation, search
pn# as a function of n, plotted logarithmically.
n# as a function of n (red dots), compared to n!. Both plots are logarithmic.

In mathematics, and more particularly in number theory, primorial is a function from natural numbers to natural numbers similar to the factorial function, but rather than successively multiplying positive integers, only prime numbers are multiplied.

There are two conflicting definitions that differ in the interpretation of the argument: the first interprets the argument as an index into the sequence of prime numbers (so that the function is strictly increasing), while the second interprets the argument as a bound on the prime numbers to be multiplied (so that the function value at any composite number is the same as at its predecessor). The rest of this article uses the latter interpretation.

The name "primorial", coined by Harvey Dubner, draws an analogy to primes similar to the way the name "factorial" relates to factors.

Definition for primorial numbers[edit]

For the nth prime number pn, the primorial pn# is defined as the product of the first n primes:[1][2]


where pk is the kth prime number. For instance, p5# signifies the product of the first 5 primes:

The first six primorials pn# are:

1, 2, 6, 30, 210, 2310 (sequence A002110 in the OEIS).

The sequence also includes p0# = 1 as empty product. Asymptotically, primorials pn# grow according to:

where o( ) is little-o notation.[2]

Definition for natural numbers[edit]

In general for a positive integer n, a primorial n# can also be defined, namely as the product of those primes ≤ n:[1][3]


where π(n) is the prime-counting function (sequence A000720 in the OEIS), giving 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#:

1, 2, 6, 6, 30, 30, 210, 210, 210, 210, 2310, 2310.

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.

Applications and properties[edit]

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).[5]

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 it 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.[6]

The n-compositorial of a composite number n is the product of all composite numbers up to and including n.[7] The n-compositorial is equal to the n-factorial divided by the primorial n#. The compositorials are

1, 4, 24, 192, 1728, 17280, 207360, 2903040, 43545600, 696729600, ...[8]


The Riemann zeta function at positive integers greater than one can be expressed[9] by using the primorial function and Jordan's totient function Jk(n):

Table of primorials[edit]

n n# pn pn# Primorial prime?
pn# + 1[10] pn# − 1[11]
0 1 N/A 1 Yes No
1 1 2 2 Yes No
2 2 3 6 Yes Yes
3 6 5 30 Yes Yes
4 6 7 210 Yes No
5 30 11 2310 Yes Yes
6 30 13 30030 No Yes
7 210 17 510510 No No
8 210 19 9699690 No No
9 210 23 223092870 No No
10 210 29 6469693230 No No
11 2310 31 200560490130 Yes No
12 2310 37 7420738134810 No No
13 30030 41 304250263527210 No Yes
14 30030 43 13082761331670030 No No
15 30030 47 614889782588491410 No No
16 30030 53 32589158477190044730 No No
17 510510 59 1922760350154212639070 No No
18 510510 61 117288381359406970983270 No No
19 9699690 67 7858321551080267055879090 No No
20 9699690 71 557940830126698960967415390 No No

See also[edit]



  • Dubner, Harvey (1987). "Factorial and primorial primes". J. Recr. Math. 19: 197–203.