Get Primorial essential facts below. View Videos or join the Primorial discussion. Add Primorial to your topic list for future reference or share this resource on social media.

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.

Definition for prime numbers

pn# as a function of n, plotted logarithmically.

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 five primorials pn# are:

2, 6, 30, 210, 2310 (sequence 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

n! (yellow) as a function of n, compared to n#(red), both plotted logarithmically.

In general, for a positive integer n, its primorial, n#, is the product of the primes that are not greater than n; that is,[1][3]


where ?(n) is the prime-counting function (sequence in the OEIS), which gives the number of primes n. This is equivalent to:

For example, 12# represents the product of those primes

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.


  • Let and be two adjacent prime numbers. Given any , where :
  • For the Primorial, the following approximation is known:[5]
  • Furthermore:
For , the values are smaller than ,[6] but for larger , the values of the function exceed the limit and oscillate infinitely around later on.
  • Let be the -th prime, then has exactly divisors. For example, has 2 divisors, has 4 divisors, has 8 divisors and already has divisors, as 97 is the 25th prime.
  • The sum of the reciprocal values of the primorial converges towards a constant
The Engel expansion of this number results in the sequence of the prime numbers (See (sequence in the OEIS))
  • According to Euclid's theorem, is used to prove the infinity of all prime numbers.

Applications and properties

Primorials play a role in the search for prime numbers in additive arithmetic progressions. For instance,  + 23# results in a prime, beginning a sequence of thirteen primes found by repeatedly adding 23#, and ending with . 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 = ).[7]

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 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.[8]

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

1, 4, 24, 192, 1728, , , , , , ...[10]


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

Table of primorials

n n# pn pn#[12] Primorial prime?
pn# + 1[13] pn# - 1[14]
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 Yes Yes
6 30 13 No Yes
7 210 17 No No
8 210 19 No No
9 210 23 No No
10 210 29 No No
11 31 Yes No
12 37 No No
13 41 No Yes
14 43 No No
15 47 No No
16 53 No No
17 59 No No
18 61 No No
19 67 No No
20 71 No No
21 73 No No
22 79 No No
23 83 No No
24 89 No Yes
25 97 No No
26 101 No No
27 103 No No
28 107 No No
29 109 No No
30 113 No No
31 127 No No
32 131 No No
33 137 No No
34 139 No No
35 149 No No
36 151 No No
37 157 No No
38 163 No No
39 167 No No
40 173 No No

See also


  1. ^ a b Weisstein, Eric W. "Primorial". MathWorld.
  2. ^ a b (sequence in the OEIS)
  3. ^ (sequence in the OEIS)
  4. ^ Weisstein, Eric W. "Chebyshev Functions". MathWorld.
  5. ^ G. H. Hardy, E. M. Wright: An Introduction to the Theory of Numbers. 4th Edition. Oxford University Press, Oxford 1975. ISBN 0-19-853310-1.
    Theorem 415, p. 341
  6. ^ L. Schoenfeld: Sharper bounds for the Chebyshev functions and . II. Math. Comp. Vol. 34, No. 134 (1976) 337-360; p. 359.
    Cited in: G. Robin: Estimation de la fonction de Tchebychef sur le -ieme nombre premier et grandes valeurs de la fonction , nombre de diviseurs premiers de . Acta Arithm. XLII (1983) 367-389 (PDF 731KB); p. 371
  7. ^ Sloane, N. J. A. (ed.). "Sequence A002182 (Highly composite numbers)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
  8. ^ Masser, D.W.; Shiu, P. (1986). "On sparsely totient numbers". Pac. J. Math. 121 (2): 407-426. doi:10.2140/pjm.1986.121.407. ISSN 0030-8730. MR 0819198. Zbl 0538.10006.
  9. ^ Wells, David (2011). Prime Numbers: The Most Mysterious Figures in Math. John Wiley & Sons. p. 29. ISBN 9781118045718. Retrieved 2016.
  10. ^ Sloane, N. J. A. (ed.). "Sequence A036691 (Compositorial numbers: product of first n composite numbers.)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
  11. ^ Mez?, István (2013). "The Primorial and the Riemann zeta function". The American Mathematical Monthly. 120 (4): 321.
  12. ^
  13. ^ Sloane, N. J. A. (ed.). "Sequence A014545 (Primorial plus 1 prime indices)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
  14. ^ Sloane, N. J. A. (ed.). "Sequence A057704 (Primorial - 1 prime indices)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.


  • Dubner, Harvey (1987). "Factorial and primorial primes". J. Recr. Math. 19: 197-203.
  • Spencer, Adam " Top 100 " Number 59 part 4.

  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.



Music Scenes