In mathematics, and more particularly in number theory, primorial, denoted by " p n # {\displaystyle 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
The primorial p n # {\displaystyle p_{n}\#} is defined as the product of the first n {\displaystyle n} primes:
p n # = ∏ k = 1 n p k , {\displaystyle p_{n}\#=\prod _{k=1}^{n}p_{k},}
where p k {\displaystyle p_{k}} is the k {\displaystyle k} th prime number. For instance, p 5 # {\displaystyle p_{5}\#} signifies the product of the first 5 primes:
p 5 # = 2 × 3 × 5 × 7 × 11 = 2310. {\displaystyle p_{5}\#=2\times 3\times 5\times 7\times 11=2310.}
The first few primorials p n # {\displaystyle p_{n}\#} are:
1, 2, 6, 30, 210, 2310, 30030, 510510, 9699690... (sequence A002110 in the OEIS). Asymptotically, primorials grow according to
p n # = e ( 1 + o ( 1 ) ) n log n . {\displaystyle p_{n}\#=e^{(1+o(1))n\log n}.}
Definition for natural numbers
In general, for a positive integer n {\displaystyle n} , its primorial n # {\displaystyle n\#} is the product of all primes less than or equal to n {\displaystyle n} ; that is,
n # = ∏ p ≤ n p prime p = ∏ i = 1 π ( n ) p i = p π ( n ) # , {\displaystyle n\#=\prod _{p\,\leq \,n \atop p\,{\text{prime}}}p=\prod _{i=1}^{\pi (n)}p_{i}=p_{\pi (n)}\#,}
where π ( n ) {\displaystyle \pi (n)} is the prime-counting function (sequence A000720 in the OEIS). This is equivalent to
n # = { 1 if n = 0 , 1 ( n − 1 ) # × n if n is prime ( n − 1 ) # if n is composite . {\displaystyle 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 # {\displaystyle 12\#} represents the product of all primes no greater than 12 {\displaystyle 12} :
12 # = 2 × 3 × 5 × 7 × 11 = 2310. {\displaystyle 12\#=2\times 3\times 5\times 7\times 11=2310.}
Since π ( 12 ) = 5 {\displaystyle \pi (12)=5} , this can be calculated as:
12 # = p π ( 12 ) # = p 5 # = 2310. {\displaystyle 12\#=p_{\pi (12)}\#=p_{5}\#=2310.}
… excerpt ends here. Continue reading the full article.


