# Primorial

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Primorial
> Markdown URL: https://mediated.wiki/source/Primorial.md
> Source: https://en.wikipedia.org/wiki/Primorial
> Source revision: 1350547756
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{short description|Product of the first "n" prime numbers}}
{{distinguish|Primordial (disambiguation){{!}}primordial}}

In [mathematics](/source/mathematics), and more particularly in [number theory](/source/number_theory), '''primorial''', denoted by "<math>p_{n}\#</math>", is a [function](/source/Function_(mathematics)) from [natural number](/source/natural_number)s to natural numbers similar to the [factorial](/source/factorial) function, but rather than successively multiplying positive integers, the function only multiplies [prime number](/source/prime_number)s.

The name "primorial", coined by [Harvey Dubner](/source/Harvey_Dubner), draws an analogy to ''primes'' similar to the way the name "factorial" relates to ''factors''.

== Definition for prime numbers ==
thumb|300px|{{math|''p''<sub>''n''</sub>#}} as a function of {{math|''n''}}, plotted logarithmically.

The primorial <math>p_n\#</math> is defined as the product of the first <math>n</math> primes:<ref name="mathworld">{{mathworld | urlname=Primorial | title=Primorial}}</ref><ref name="OEIS A002110">{{OEIS|id=A002110}}</ref>
: <math>p_n\# = \prod_{k=1}^n p_k,</math>
where <math>p_k</math> is the {{tmath|k}}th prime number. For instance, <math>p_5\#</math> signifies the product of the first 5 primes:
: <math>p_5\# = 2 \times 3 \times 5 \times 7 \times 11= 2310.</math>

The first few primorials <math>p_n\#</math> are:
: [1](/source/1_(number)), [2](/source/2_(number)), [6](/source/6_(number)), [30](/source/30_(number)), [210](/source/210_(number)), [2310](/source/2310_(number)), 30030, 510510, 9699690... {{OEIS|id=A002110}}.

Asymptotically, primorials grow according to<ref name="OEIS A002110"/>
: <math>p_n\# = e^{(1 + o(1)) n \log n}.</math>

== Definition for natural numbers ==
thumb|300px|<math>n!</math> (yellow) as a function of {{tmath|n}}, compared to <math>n\#</math> (red), both plotted logarithmically.

In general, for a positive integer {{tmath|n}}, its primorial <math>n\#</math> is the product of all primes less than or equal to {{tmath|n}}; that is,<ref name="mathworld" /><ref name="OEIS A034386">{{OEIS|id=A034386}}</ref>
: <math>n\# = \prod_{p\,\leq\, n\atop p\,\text{prime}} p = \prod_{i=1}^{\pi(n)} p_i = p_{\pi(n)}\#,</math>
where <math>\pi(n)</math> is the [prime-counting function](/source/prime-counting_function) {{OEIS|id=A000720}}. This is equivalent to
: <math>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}</math>

For example, <math>12\#</math> represents the product of all primes no greater than {{tmath|12}}:
: <math>12\# = 2 \times 3 \times 5 \times 7 \times 11= 2310.</math>

Since <math>\pi(12)=5</math>, this can be calculated as:
: <math>12\# = p_{\pi(12)}\# = p_5\# = 2310.</math>

Consider the first 12 values of the sequence {{tmath|n\#}}:
: <math>1, 2, 6, 6, 30, 30, 210, 210, 210, 210, 2310, 2310.</math>

We see that for [composite](/source/composite_number) {{tmath|n}}, every term <math>n\#</math> is equal to the preceding term {{tmath|(n-1)\#}}. In the above example we have <math>12\# = p_5\# = 11\#</math> since {{tmath|12}} is composite.

Primorials are related to the first [Chebyshev function](/source/Chebyshev_function) <math>\vartheta(n)</math> by<ref>{{mathworld | urlname=ChebyshevFunctions | title=Chebyshev Functions}}</ref>
: <math>\ln (n\#) = \vartheta(n).</math>

Since <math>\vartheta(n)</math> asymptotically approaches <math>n</math> for large values of {{tmath|n}}, primorials therefore grow according to:
: <math>n\# = e^{(1+o(1))n}.</math>

== Properties ==

* For any {{tmath| n, p \in \mathbb{N} }}, <math>n\#=p\#</math> [iff](/source/iff) <math>p</math> is the largest prime such that {{tmath|p\leq n}}.
* Let <math>p_k</math> be the {{tmath|k}}th prime. Then <math>p_k\#</math> has exactly <math>2^k</math> divisors.
* The sum of the reciprocal values of the primorial [converges](/source/Convergent_series) towards a constant
*: <math>\sum_{p\,\text{prime}}  {1 \over p\#} = {1 \over 2} + {1 \over 6} + {1 \over 30} + \ldots = 0{.}7052301717918\ldots</math> {{OEIS|A064648}}
: The [Engel expansion](/source/Engel_expansion) of this number results in the sequence of the prime numbers. Griffiths (2015) proved that it is irrational.<ref>{{cite journal |last1=Griffiths |first1=Martin |title=99.29 On the sum of the reciprocals of the primorials |journal=The Mathematical Gazette |date=November 2015 |volume=99 |issue=546 |pages=522–523 |doi=10.1017/mag.2015.91}}</ref>
* Euclid's proof of his [theorem on the infinitude of primes](/source/Euclid's_theorem) can be paraphrased by saying that, for any prime <math>p</math>, the number <math>p\# +1</math> has a prime divisor not contained in the set of primes less than or equal to <math>p</math>.
* {{tmath|1= \lim_{n \to \infty}\sqrt[n]{n\#} = e }}. For {{tmath| n<10^{11} }}, the values are smaller than <math>e</math>,<ref>L. Schoenfeld: ''Sharper bounds for the Chebyshev functions <math>\theta(x)</math> and <math>\psi(x)</math>''. II. ''Math. Comp.'' Vol.&nbsp;34, No.&nbsp;134 (1976) 337–360; p.&nbsp;359.<br />Cited in: G. Robin: ''Estimation de la fonction de Tchebychef <math>\theta</math> sur le {{mvar|k}}-ieme nombre premier et grandes valeurs de la fonction <math>\omega(n)</math>, 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.&nbsp;371</ref> but for larger <math>n</math>, the values of the function exceed <math>e</math> and oscillate infinitely around <math>e</math> later on.
* Since the [binomial coefficient](/source/binomial_coefficient) <math>\tbinom{2n}{n}</math> is divisible by every prime between <math>n+1</math> and {{tmath|2n}}, and since <math>\tbinom{2n}{n} \leq 4^{n}</math>, we have the following upper bound:<ref>[G. H. Hardy](/source/G._H._Hardy), [E. M. Wright](/source/E._M._Wright): ''[An Introduction to the Theory of Numbers](/source/An_Introduction_to_the_Theory_of_Numbers)''. 4th Edition. Oxford University Press, Oxford 1975. {{ISBN|0-19-853310-1}}.<br />Theorem 415, p.&nbsp;341</ref> <math>n\#\leq 4^n</math>.
** Using elementary methods, Denis Hanson showed that {{tmath| n\#\leq 3^n }}.<ref>{{cite journal |last=Hanson |first=Denis |date=March 1972 |title=On the Product of the Primes |journal=[Canadian Mathematical Bulletin](/source/Canadian_Mathematical_Bulletin) |volume=15 |issue=1 |pages=33–37 |doi=10.4153/cmb-1972-007-7|doi-access=free |issn=0008-4395}}</ref>
** Using more advanced methods, Rosser and Schoenfeld  showed that <math>n\#\leq (2.763)^n</math>.<ref name="RosserSchoenfeld1962">{{cite journal |last1=Rosser |first1=J. Barkley |last2=Schoenfeld |first2=Lowell |date=1962-03-01 |title=Approximate formulas for some functions of prime numbers |journal=Illinois Journal of Mathematics |volume=6 |issue=1 |doi=10.1215/ijm/1255631807 |issn=0019-2082|doi-access=free }}</ref> Furthermore, they showed that for {{tmath|n \ge 563}}, {{tmath|n\#\geq (2.22)^n}}.<ref name="RosserSchoenfeld1962"/>

== Applications ==

Primorials play a role in the search for [prime numbers in additive arithmetic progressions](/source/Primes_in_arithmetic_progression). For instance, 
<math>2 236 133 941+23\#</math> results in a prime, beginning a sequence of thirteen primes found by repeatedly adding {{tmath|23\#}}, and ending with {{tmath|5136341251}}. <math>23\#</math> is also the common difference in arithmetic progressions of fifteen and sixteen primes.

Every [highly composite number](/source/highly_composite_number) is a product of primorials.<ref>{{cite OEIS|sequencenumber=A002182|name=Highly composite numbers}}</ref>

Primorials are all [square-free integer](/source/square-free_integer)s, and each one has more distinct [prime factor](/source/prime_factor)s than any number smaller than it. For each primorial {{tmath|n}}, the fraction <math>\varphi(n)/n</math> is smaller than for any positive integer less than {{tmath|n}}, where <math>\varphi</math> is the [Euler totient function](/source/Euler_totient_function).

Any [completely multiplicative function](/source/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](/source/Mixed_Radix)) have a lower proportion of [repeating fraction](/source/repeating_fraction)s than any smaller base.

Every primorial is a [sparsely totient number](/source/sparsely_totient_number).<ref>{{cite journal | last1=Masser | first1=D.W. | author1-link=David Masser | last2=Shiu | first2=P. | title=On sparsely totient numbers | journal=Pacific Journal of Mathematics | volume=121 | pages=407–426 | year=1986 | issue=2 | issn=0030-8730 | zbl=0538.10006 | url=http://projecteuclid.org/euclid.pjm/1102702441 | mr=819198 | doi=10.2140/pjm.1986.121.407| doi-access=free }}</ref>

== Compositorial ==

The {{tmath|n}}-compositorial of a [composite number](/source/composite_number) {{tmath|n}} is the product of all composite numbers up to and including {{tmath|n}}.<ref name="Wells 2011">{{cite book |last1=Wells |first1=David |author-link=David G. Wells |title=Prime Numbers: The Most Mysterious Figures in Math |date=2011 |publisher=John Wiley & Sons |isbn=9781118045718|page=29 |url=https://books.google.com/books?id=1MTcYrbTdsUC&q=Compositorial+primorial&pg=PA29 |access-date=16 March 2016 }}</ref> The {{tmath|n}}-compositorial is equal to the {{tmath|n}}-[factorial](/source/factorial) divided by the primorial {{tmath|n\#}}. The compositorials are
:[1](/source/1_(number)), [4](/source/4_(number)), [24](/source/24_(number)), [192](/source/192_(number)), [1728](/source/1728_(number)), {{val|17280}}, {{val|207360}}, {{val|2903040}}, {{val|43545600}}, {{val|696729600}}, ...<ref>{{cite OEIS|sequencenumber=A036691|name=Compositorial numbers: product of first n composite numbers.}}</ref>

== Riemann zeta function ==

The [Riemann zeta function](/source/Riemann_zeta_function) at positive integers greater than one can be expressed<ref name=mezo/> by using the primorial function and [Jordan's totient function](/source/Jordan's_totient_function) {{tmath|J_k}}:
: <math> \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} </math>.

== Table of primorials ==

{| class="wikitable" style="text-align:right"
|-
! rowspan="2" | {{mvar|n}}
! rowspan="2" | {{math|''n''#}}
! rowspan="2" | {{math|''p''<sub>''n''</sub>}}
! rowspan="2" | {{math|''p''<sub>''n''</sub>#}}
! colspan="2" | [Primorial prime](/source/Primorial_prime)?
|-
! {{math|''p''<sub>''n''</sub># + 1}}<ref>{{cite OEIS|sequencenumber=A014545|name=Primorial plus 1 prime indices}}</ref>
! {{math|''p''<sub>''n''</sub># − 1}}<ref>{{cite OEIS|sequencenumber=A057704|name=Primorial - 1 prime indices}}</ref>
|-
| 0
| 1
| {{n/a}}
| [1](/source/Empty_product)
| {{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
| {{val|2310|fmt=gaps}}
| {{yes}}
| {{yes}}
|-
| 6
| 30
| 13
| {{val|30030}}
| {{no}}
| {{yes}}
|-
| 7
| 210
| 17
| {{val|510510}}
| {{no}}
| {{no}}
|-
| 8
| 210
| 19
| {{val|9699690}}
| {{no}}
| {{no}}
|-
| 9
| 210
| 23
| {{val|223092870}}
| {{no}}
| {{no}}
|-
| 10
| 210
| 29
| {{val|6469693230}}
| {{no}}
| {{no}}
|-
| 11
| {{val|2310|fmt=gaps}}
| 31
| {{val|200560490130}}
| {{yes}}
| {{no}}
|-
| 12
| {{val|2310|fmt=gaps}}
| 37
| {{val|7420738134810}}
| {{no}}
| {{no}}
|-
| 13
| {{val|30030}}
| 41
| {{val|304250263527210}}
| {{no}}
| {{yes}}
|-
| 14
| {{val|30030}}
| 43
| {{val|13082761331670030}}
| {{no}}
| {{no}}
|-
| 15
| {{val|30030}}
| 47
| {{val|614889782588491410}}
| {{no}}
| {{no}}
|-
| 16
| {{val|30030}}
| 53
| {{val|32589158477190044730}}
| {{no}}
| {{no}}
|-
| 17
| {{val|510510}}
| 59
| {{val|1922760350154212639070}}
| {{no}}
| {{no}}
|-
| 18
| {{val|510510}}
| 61
| {{val|117288381359406970983270}}
| {{No}}
| {{No}}
|-
| 19
| {{val|9699690}}
| 67
| {{val|7858321551080267055879090}}
| {{no}}
| {{no}}
|-
| 20
| {{val|9699690}}
| 71
| {{val|557940830126698960967415390}}
| {{no}}
| {{no}}
|-
| 21
| {{val|9699690}}
| 73
| {{val|40729680599249024150621323470}}
| {{no}}
| {{no}}
|-
| 22
| {{val|9699690}}
| 79
| {{val|3217644767340672907899084554130}}
| {{no}}
| {{no}}
|-
| 23
| {{val|223092870}}
| 83
| {{val|267064515689275851355624017992790}}
| {{no}}
| {{no}}
|-
| 24
| {{val|223092870}}
| 89
| {{val|23768741896345550770650537601358310}}
| {{no}}
| {{yes}}
|-
| 25
| {{val|223092870}}
| 97
| {{val|2305567963945518424753102147331756070}}
| {{no}}
| {{no}}
|-
| 26
| {{val|223092870}}
| 101
| {{val|232862364358497360900063316880507363070}}
| {{no}}
| {{no}}
|-
| 27
| {{val|223092870}}
| 103
| {{val|23984823528925228172706521638692258396210}}
| {{no}}
| {{no}}
|-
| 28
| {{val|223092870}}
| 107
| {{val|2566376117594999414479597815340071648394470}}
| {{no}}
| {{no}}
|-
| 29
| {{val|6469693230}}
| 109
| {{val|279734996817854936178276161872067809674997230}}
| {{no}}
| {{no}}
|-
| 30
| {{val|6469693230}}
| 113
| {{val|31610054640417607788145206291543662493274686990}}
| {{no}}
| {{no}}
|-
| 31
| {{val|200560490130}}
| 127
| {{val|4014476939333036189094441199026045136645885247730}}
| {{no}}
| {{no}}
|-
| 32
| {{val|200560490130}}
| 131
| {{val|525896479052627740771371797072411912900610967452630}}
| {{no}}
| {{no}}
|-
| 33
| {{val|200560490130}}
| 137
| {{val|72047817630210000485677936198920432067383702541010310}}
| {{no}}
| {{no}}
|-
| 34
| {{val|200560490130}}
| 139
| {{val|10014646650599190067509233131649940057366334653200433090}}
| {{no}}
| {{no}}
|-
| 35
| {{val|200560490130}}
| 149
| {{val|1492182350939279320058875736615841068547583863326864530410}}
| {{no}}
| {{no}}
|-
| 36
| {{val|200560490130}}
| 151
| {{val|225319534991831177328890236228992001350685163362356544091910}}
| {{no}}
| {{no}}
|-
| 37
| {{val|7420738134810}}
| 157
| {{val|35375166993717494840635767087951744212057570647889977422429870}}
| {{no}}
| {{no}}
|-
| 38
| {{val|7420738134810}}
| 163
| {{val|5766152219975951659023630035336134306565384015606066319856068810}}
| {{no}}
| {{no}}
|-
| 39
| {{val|7420738134810}}
| 167
| {{val|962947420735983927056946215901134429196419130606213075415963491270}}
| {{no}}
| {{no}}
|-
| 40
| {{val|7420738134810}}
| 173
| {{val|166589903787325219380851695350896256250980509594874862046961683989710}}
| {{no}}
| {{no}}
|}

== See also ==
* [Bonse's inequality](/source/Bonse's_inequality)
* [Chebyshev function](/source/Chebyshev_function)
* [Primorial number system](/source/Mixed_Radix)
* [Primorial prime](/source/Primorial_prime)

== Notes ==
<references>
<ref name=mezo>
{{cite journal 
| 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 
}}</ref>
</references>

== References ==
* {{cite journal | last1 = Dubner | first1 = Harvey | year = 1987 | title = Factorial and primorial primes | journal = [J. Recr. Math.](/source/Journal_of_Recreational_Mathematics) | volume = 19 | pages = 197–203 }}
* Spencer, Adam "Top 100" Number 59 part 4.

Category:Integer sequences
Category:Factorial and binomial topics
Category:Prime numbers

---
Adapted from the Wikipedia article [Primorial](https://en.wikipedia.org/wiki/Primorial) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Primorial?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
