# Definition:Primorial/Positive Integer

## Definition

Let $n$ be a positive integer.

Then:

$\displaystyle n\# := \prod_{i \mathop = 1}^{\pi \left({n}\right)} p_i = p_{\pi \left({n}\right)}\#$

where $\pi \left({n}\right)$ is the prime counting function.

That is, $n\#$ is defined as the product of all primes less than or equal to $n$.

Thus:

$n\# = \begin{cases} 1 & : n \le 1 \\ n \left({\left({n - 1}\right)\#}\right) & : n \mbox { prime} \\ \left({n - 1}\right)\# & : n \mbox { composite} \end{cases}$

## Examples

The first few primorials (of both types) are as follows:

 $\displaystyle 0\# \ \$ $\displaystyle = p_0 \#$ $=$ $\displaystyle$ $\displaystyle = 1$ $\displaystyle 1\# \ \$ $\displaystyle = p_0 \#$ $=$ $\displaystyle$ $\displaystyle = 1$ $\displaystyle 2\# \ \$ $\displaystyle = p_1 \#$ $=$ $\displaystyle$ $\displaystyle = 2$ $\displaystyle 3\# \ \$ $\displaystyle = p_2\#$ $=$ $\displaystyle 2 \times 3$ $\displaystyle = 6$ $\displaystyle 4\# \ \$ $\displaystyle = p_2\#$ $=$ $\displaystyle 2 \times 3$ $\displaystyle = 6$ $\displaystyle 5\# \ \$ $\displaystyle = p_3\#$ $=$ $\displaystyle 2 \times 3 \times 5$ $\displaystyle = 30$ $\displaystyle 6\# \ \$ $\displaystyle = p_3\#$ $=$ $\displaystyle 2 \times 3 \times 5$ $\displaystyle = 30$ $\displaystyle 7\# \ \$ $\displaystyle = p_4\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7$ $\displaystyle = 210$ $\displaystyle 8\# \ \$ $\displaystyle = p_4\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7$ $\displaystyle = 210$ $\displaystyle 9\# \ \$ $\displaystyle = p_4\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7$ $\displaystyle = 210$ $\displaystyle 10\# \ \$ $\displaystyle = p_4\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7$ $\displaystyle = 210$ $\displaystyle 11\# \ \$ $\displaystyle = p_5\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7 \times 11$ $\displaystyle = 2310$ $\displaystyle 12\# \ \$ $\displaystyle = p_5\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7 \times 11$ $\displaystyle = 2310$ $\displaystyle 13\# \ \$ $\displaystyle = p_6\#$ $=$ $\displaystyle 2 \times 3 \times 5 \times 7 \times 11 \times 13$ $\displaystyle = 30 \, 030$

The sequence contines:

$1, 2, 6, 30, 210, 2310, 30 \, 030, 510 \, 510, 9 \, 699 \, 690, 223 \, 092 \, 870, \ldots$