Primorial Last updated December 06, 2025 Product of the first "n" prime numbers
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 pn # as a function of n , plotted logarithmically. The primorial p n # {\displaystyle p_{n}\#} is defined as the product of the first n {\displaystyle n} primes: [ 1] [ 2]
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 [ 2]
p n # = e ( 1 + o ( 1 ) ) n log n . {\displaystyle p_{n}\#=e^{(1+o(1))n\log n}.} Definition for natural numbers n ! {\displaystyle n!} (yellow) as a function of n {\displaystyle n} , compared to n # {\displaystyle n\#} (red), both plotted logarithmically. 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, [ 1] [ 3]
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:
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.} Consider the first 12 values of the sequence n # {\displaystyle n\#} :
1 , 2 , 6 , 6 , 30 , 30 , 210 , 210 , 210 , 210 , 2310 , 2310. {\displaystyle 1,2,6,6,30,30,210,210,210,210,2310,2310.} We see that for composite n {\displaystyle n} , every term n # {\displaystyle n\#} is equal to the preceding term ( n − 1 ) # {\displaystyle (n-1)\#} . In the above example we have 12 # = p 5 # = 11 # {\displaystyle 12\#=p_{5}\#=11\#} since 12 is composite.
Primorials are related to the first Chebyshev function ϑ ( n ) {\displaystyle \vartheta (n)} by [ 4]
ln ( n # ) = ϑ ( n ) . {\displaystyle \ln(n\#)=\vartheta (n).} Since ϑ ( n ) {\displaystyle \vartheta (n)} asymptotically approaches n {\displaystyle n} for large values of n {\displaystyle n} , primorials therefore grow according to:
n # = e ( 1 + o ( 1 ) ) n . {\displaystyle n\#=e^{(1+o(1))n}.} Properties For any n , p ∈ N {\displaystyle n,p\in \mathbb {N} } , n # = p # {\displaystyle n\#=p\#} iff p {\displaystyle p} is the largest prime such that p ≤ n {\displaystyle p\leq n} . Let p k {\displaystyle p_{k}} be the k {\displaystyle k} -th prime. Then p k # {\displaystyle p_{k}\#} has exactly 2 k {\displaystyle 2^{k}} divisors. The sum of the reciprocal values of the primorial converges towards a constant ∑ p prime 1 p # = 1 2 + 1 6 + 1 30 + … = 0 . 7052301717918 … {\displaystyle \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 (sequence A064648 in the OEIS ) . Euclid's proof of his theorem on the infinitude of primes can be paraphrased by saying that, for any prime p {\displaystyle p} , the number p # + 1 {\displaystyle p\#+1} has a prime divisor not contained in the set of primes less than or equal to p {\displaystyle p} . lim n → ∞ n # n = e {\displaystyle \lim _{n\to \infty }{\sqrt[{n}]{n\#}}=e} . For n < 10 11 {\displaystyle n<10^{11}} , the values are smaller than e {\displaystyle e} , [ 5] but for larger n {\displaystyle n} , the values of the function exceed e {\displaystyle e} and oscillate infinitely around e {\displaystyle e} later on.Since the binomial coefficient ( 2 n n ) {\displaystyle {\tbinom {2n}{n}}} is divisible by every prime between n + 1 {\displaystyle n+1} and 2 n {\displaystyle 2n} , and since ( 2 n n ) ≤ 4 n {\displaystyle {\tbinom {2n}{n}}\leq 4^{n}} , we have the following upper bound: [ 6] n # ≤ 4 n {\displaystyle n\#\leq 4^{n}} . Using elementary methods, Denis Hanson showed that n # ≤ 3 n {\displaystyle n\#\leq 3^{n}} . [ 7] Using more advanced methods, Rosser and Schoenfeld showed that n # ≤ ( 2.763 ) n {\displaystyle n\#\leq (2.763)^{n}} . [ 8] Furthermore, they showed that for n ≥ 563 {\displaystyle n\geq 563} , n # ≥ ( 2.22 ) n {\displaystyle n\#\geq (2.22)^{n}} . [ 8] Applications Primorials play a role in the search for prime numbers in additive arithmetic progressions . For instance, 2236133941 + 23 # {\displaystyle 2236133941+23\#} results in a prime, beginning a sequence of thirteen primes found by repeatedly adding 23 # {\displaystyle 23\#} , and ending with 5136341251 {\displaystyle 5136341251} . 23 # {\displaystyle 23\#} is also the common difference in arithmetic progressions of fifteen and sixteen primes.
Every highly composite number is a product of primorials. [ 9]
Primorials are all square-free integers , and each one has more distinct prime factors than any number smaller than it. For each primorial n {\displaystyle n} , the fraction φ ( n ) / n {\displaystyle \varphi (n)/n} is smaller than for any positive integer less than n {\displaystyle n} , where φ {\displaystyle \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 . [ 10]
Compositorial The n -compositorial of a composite number n is the product of all composite numbers up to and including n . [ 11] The n -compositorial is equal to the n -factorial divided by the primorial n # . The compositorials are
1 , 4 , 24 , 192 , 1728 , 17280 , 207360 , 2903 040 , 43545 600 , 696729 600 , ... [ 12] Riemann zeta function The Riemann zeta function at positive integers greater than one can be expressed [ 13] by using the primorial function and Jordan's totient function J k {\displaystyle J_{k}} :
ζ ( k ) = 2 k 2 k − 1 + ∑ r = 2 ∞ ( p r − 1 # ) k J k ( p r # ) , k ∈ Z > 1 {\displaystyle \zeta (k)={\frac {2^{k}}{2^{k}-1}}+\sum _{r=2}^{\infty }{\frac {(p_{r-1}\#)^{k}}{J_{k}(p_{r}\#)}},\quad k\in \mathbb {Z} _{>1}} .Table of primorials n n #pn pn # Primorial prime ? pn # + 1 [ 14] pn # − 1 [ 15] 0 1 — 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 9699 690 No No 9 210 23 223092 870 No No 10 210 29 6469 693 230 No No 11 2310 31 200560 490 130 Yes No 12 2310 37 7420 738 134 810 No No 13 30030 41 304250 263 527 210 No Yes 14 30030 43 13082 761 331 670 030 No No 15 30030 47 614889 782 588 491 410 No No 16 30030 53 32589 158 477 190 044 730 No No 17 510510 59 1922 760 350 154 212 639 070 No No 18 510510 61 117288 381 359 406 970 983 270 No No 19 9699 690 67 7858 321 551 080 267 055 879 090 No No 20 9699 690 71 557940 830 126 698 960 967 415 390 No No 21 9699 690 73 40729 680 599 249 024 150 621 323 470 No No 22 9699 690 79 3217 644 767 340 672 907 899 084 554 130 No No 23 223092 870 83 267064 515 689 275 851 355 624 017 992 790 No No 24 223092 870 89 23768 741 896 345 550 770 650 537 601 358 310 No Yes 25 223092 870 97 2305 567 963 945 518 424 753 102 147 331 756 070 No No 26 223092 870 101 232862 364 358 497 360 900 063 316 880 507 363 070 No No 27 223092 870 103 23984 823 528 925 228 172 706 521 638 692 258 396 210 No No 28 223092 870 107 2566 376 117 594 999 414 479 597 815 340 071 648 394 470 No No 29 6469 693 230 109 279734 996 817 854 936 178 276 161 872 067 809 674 997 230 No No 30 6469 693 230 113 31610 054 640 417 607 788 145 206 291 543 662 493 274 686 990 No No 31 200560 490 130 127 4014 476 939 333 036 189 094 441 199 026 045 136 645 885 247 730 No No 32 200560 490 130 131 525896 479 052 627 740 771 371 797 072 411 912 900 610 967 452 630 No No 33 200560 490 130 137 72047 817 630 210 000 485 677 936 198 920 432 067 383 702 541 010 310 No No 34 200560 490 130 139 10014 646 650 599 190 067 509 233 131 649 940 057 366 334 653 200 433 090 No No 35 200560 490 130 149 1492 182 350 939 279 320 058 875 736 615 841 068 547 583 863 326 864 530 410 No No 36 200560 490 130 151 225319 534 991 831 177 328 890 236 228 992 001 350 685 163 362 356 544 091 910 No No 37 7420 738 134 810 157 35375 166 993 717 494 840 635 767 087 951 744 212 057 570 647 889 977 422 429 870 No No 38 7420 738 134 810 163 5766 152 219 975 951 659 023 630 035 336 134 306 565 384 015 606 066 319 856 068 810 No No 39 7420 738 134 810 167 962947 420 735 983 927 056 946 215 901 134 429 196 419 130 606 213 075 415 963 491 270 No No 40 7420 738 134 810 173 166589 903 787 325 219 380 851 695 350 896 256 250 980 509 594 874 862 046 961 683 989 710 No No
Notes 1 2 Weisstein, Eric W. "Primorial" . MathWorld . 1 2 (sequence A002110 in the OEIS ) ↑ (sequence A034386 in the OEIS ) ↑ Weisstein, Eric W. "Chebyshev Functions" . MathWorld . ↑ L. Schoenfeld: Sharper bounds for the Chebyshev functions θ ( x ) {\displaystyle \theta (x)} and ψ ( x ) {\displaystyle \psi (x)} . II. Math. Comp. Vol. 34, No. 134 (1976) 337–360; p. 359. Cited in: G. Robin: Estimation de la fonction de Tchebychef θ {\displaystyle \theta } sur le k -ieme nombre premier et grandes valeurs de la fonction ω ( n ) {\displaystyle \omega (n)} , nombre de diviseurs premiers de n . Acta Arithm. XLII (1983) 367–389 (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 . 15 (1): 33– 37. doi : 10.4153/cmb-1972-007-7 . ISSN 0008-4395 . 1 2 Rosser, J. Barkley; Schoenfeld, Lowell (1962-03-01). "Approximate formulas for some functions of prime numbers" . Illinois Journal of Mathematics . 6 (1). doi : 10.1215/ijm/1255631807 . ISSN 0019-2082 . ↑ Sloane, N. J. A. (ed.). "Sequence A002182 (Highly composite numbers)" . The On-Line Encyclopedia of Integer Sequences . OEIS Foundation. ↑ Masser, D.W. ; Shiu, P. (1986). "On sparsely totient numbers" . Pacific Journal of Mathematics . 121 (2): 407– 426. doi : 10.2140/pjm.1986.121.407 . ISSN 0030-8730 . MR 0819198 . Zbl 0538.10006 . ↑ Wells, David (2011). Prime Numbers: The Most Mysterious Figures in Math . John Wiley & Sons. p. 29. ISBN 9781118045718 . Retrieved 16 March 2016 . ↑ Sloane, N. J. A. (ed.). "Sequence A036691 (Compositorial numbers: product of first n composite numbers.)" . The On-Line Encyclopedia of Integer Sequences . OEIS Foundation. ↑ Mező, István (2013). "The Primorial and the Riemann zeta function". The American Mathematical Monthly . 120 (4): 321. ↑ Sloane, N. J. A. (ed.). "Sequence A014545 (Primorial plus 1 prime indices)" . The On-Line Encyclopedia of Integer Sequences . OEIS Foundation. ↑ Sloane, N. J. A. (ed.). "Sequence A057704 (Primorial - 1 prime indices)" . The On-Line Encyclopedia of Integer Sequences . OEIS Foundation. References Dubner, Harvey (1987). "Factorial and primorial primes". J. Recr. Math. 19 : 197– 203. Spencer, Adam "Top 100" Number 59 part 4. This page is based on this
Wikipedia article Text is available under the
CC BY-SA 4.0 license; additional terms may apply.
Images, videos and audio are available under their respective licenses.