Primorial
Product of the first "n" prime numbers
title: "Primorial" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["integer-sequences", "factorial-and-binomial-topics", "prime-numbers"] description: "Product of the first "n" prime numbers" topic_path: "arts/film" source: "https://en.wikipedia.org/wiki/Primorial" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Product of the first "n" prime numbers ::
In mathematics, and more particularly in number theory, primorial, denoted by "p_{n}#", 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
::figure[src="https://upload.wikimedia.org/wikipedia/commons/e/e3/Primorial_pn_plot.png" caption="''n''}}, plotted logarithmically."] ::
The primorial p_n# is defined as the product of the first n primes:
:p_n# = \prod_{k=1}^n p_k,
where p_k is the k-th prime number. For instance, p_5# signifies the product of the first 5 primes:
:p_5# = 2 \times 3 \times 5 \times 7 \times 11= 2310.
The first few primorials p_n# are:
:1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690... .
Asymptotically, primorials grow according to
:p_n# = e^{(1 + o(1)) n \log n}.
Definition for natural numbers
::figure[src="https://upload.wikimedia.org/wikipedia/commons/6/62/Primorial_n_plot.png" caption="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 all primes less than or equal to n; that is,
:n# = \prod_{p,\leq, n\atop p,\text{prime}} p = \prod_{i=1}^{\pi(n)} p_i = p_{\pi(n)}#,
where \pi(n) is the prime-counting function . This is equivalent to
:n# = \begin{cases} 1 & \text{if }n = 0,\ 1 \ (n-1)# \times n & \text{if } n \text{ is prime} \ (n-1)# & \text{if } n \text{ is composite}. \end{cases}
For example, 12# represents the product of all primes no greater than 12:
:12# = 2 \times 3 \times 5 \times 7 \times 11= 2310.
Since \pi(12)=5, this can be calculated as:
:12# = p_{\pi(12)}# = p_5# = 2310.
Consider the first 12 values of the sequence n#:
:1, 2, 6, 6, 30, 30, 210, 210, 210, 210, 2310, 2310.
We see that for composite n, every term n# is equal to the preceding term (n-1)#. In the above example we have 12# = p_5# = 11# since 12 is composite.
Primorials are related to the first Chebyshev function \vartheta(n) by
:\ln (n#) = \vartheta(n).
Since \vartheta(n) asymptotically approaches n for large values of n, primorials therefore grow according to: :n# = e^{(1+o(1))n}.
Properties
-
For any n, p \in \mathbb{N}, n#=p# iff p is the largest prime such that p\leq n.
-
Let p_k be the k-th prime. Then p_k# has exactly 2^k divisors.
-
The sum of the reciprocal values of the primorial converges towards a constant :\sum_{p,\text{prime}} {1 \over p#} = {1 \over 2} + {1 \over 6} + {1 \over 30} + \ldots = 0{.}7052301717918\ldots :The Engel expansion of this number results in the sequence of the prime numbers .
-
Euclid's proof of his theorem on the infinitude of primes can be paraphrased by saying that, for any prime p, the number p# +1 has a prime divisor not contained in the set of primes less than or equal to p.
-
\lim_{n \to \infty}\sqrt[n]{n#} = e . For n, the values are smaller than e, but for larger n, the values of the function exceed e and oscillate infinitely around e later on.
-
Since the binomial coefficient \tbinom{2n}{n} is divisible by every prime between n+1 and 2n, and since \tbinom{2n}{n} \leq 4^{n}, we have the following upper bound: n#\leq 4^n.
- Using elementary methods, Denis Hanson showed that n#\leq 3^n.
- Using more advanced methods, Rosser and Schoenfeld showed that n#\leq (2.763)^n. Furthermore, they showed that for n \ge 563, n#\geq (2.22)^n.
Applications
Primorials play a role in the search for prime numbers in additive arithmetic progressions. For instance, 2 236 133 941+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.
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 \varphi(n)/n is smaller than for any positive integer less than n, where \varphi 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.
Compositorial
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 :1, 4, 24, 192, 1728, , , , , , ...
Riemann zeta function
The Riemann zeta function at positive integers greater than one can be expressed by using the primorial function and Jordan's totient function J_k: : \zeta(k)=\frac{2^k}{2^k-1}+\sum_{r=2}^\infty\frac{(p_{r-1}#)^k}{J_k(p_r#)},\quad k\in\Z_{1} .
Table of primorials
::data[format=table]
| n | n# | pn | pn# | Primorial prime? | pn# + 1 | pn# − 1 |
|---|---|---|---|---|---|---|
| 0 | 1 | 1 | ||||
| 1 | 1 | 2 | 2 | |||
| 2 | 2 | 3 | 6 | |||
| 3 | 6 | 5 | 30 | |||
| 4 | 6 | 7 | 210 | |||
| 5 | 30 | 11 | ||||
| 6 | 30 | 13 | ||||
| 7 | 210 | 17 | ||||
| 8 | 210 | 19 | ||||
| 9 | 210 | 23 | ||||
| 10 | 210 | 29 | ||||
| 11 | 31 | |||||
| 12 | 37 | |||||
| 13 | 41 | |||||
| 14 | 43 | |||||
| 15 | 47 | |||||
| 16 | 53 | |||||
| 17 | 59 | |||||
| 18 | 61 | |||||
| 19 | 67 | |||||
| 20 | 71 | |||||
| 21 | 73 | |||||
| 22 | 79 | |||||
| 23 | 83 | |||||
| 24 | 89 | |||||
| 25 | 97 | |||||
| 26 | 101 | |||||
| 27 | 103 | |||||
| 28 | 107 | |||||
| 29 | 109 | |||||
| 30 | 113 | |||||
| 31 | 127 | |||||
| 32 | 131 | |||||
| 33 | 137 | |||||
| 34 | 139 | |||||
| 35 | 149 | |||||
| 36 | 151 | |||||
| 37 | 157 | |||||
| 38 | 163 | |||||
| 39 | 167 | |||||
| 40 | 173 | |||||
| :: |
Notes
| last1 = Mező | first1 = István | title = The Primorial and the Riemann zeta function | journal = The American Mathematical Monthly | volume = 120 | issue = 4 | pages = 321 | year = 2013
References
- Spencer, Adam "Top 100" Number 59 part 4.
References
- "Primorial".
- {{OEIS
- {{OEIS
- "Chebyshev Functions".
- L. Schoenfeld: ''Sharper bounds for the Chebyshev functions \theta(x) and \psi(x)''. II. ''Math. Comp.'' Vol. 34, No. 134 (1976) 337–360; p. 359.
Cited in: G. Robin: ''Estimation de la fonction de Tchebychef \theta sur le {{mvar. k-ieme nombre premier et grandes valeurs de la fonction \omega(n), nombre de diviseurs premiers de {{mvar. n''. ''Acta Arithm.'' XLII (1983) 367–389 ([http://matwbn.icm.edu.pl/ksiazki/aa/aa42/aa4242.pdf PDF 731KB]); p. 371 - 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 - Hanson, Denis. (March 1972). "On the Product of the Primes". [[Canadian Mathematical Bulletin]].
- (1962-03-01). "Approximate formulas for some functions of prime numbers". Illinois Journal of Mathematics.
- {{Cite OEIS
- (1986). "On sparsely totient numbers". Pacific Journal of Mathematics.
- (2011). "Prime Numbers: The Most Mysterious Figures in Math". John Wiley & Sons.
- {{Cite OEIS
- {{Cite OEIS
- {{Cite OEIS
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::