Tool to compute a primorial. Primorial n# is the product of all prime numbers inferior or equal to n, or the product of all n first prime numbers (it depend on the selected definition)

Primorial - dCode

Tag(s) : Arithmetics

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

The term **primorial** refers to two separate definitions/formulae according to some uses:

**(1)** **Primorial** defined as the product of all prime numbers inferior or equal to $ n $ is a multiplication conditioned par a primality test of the numbers inferior or equal to $ n $, see OEIS here (link)

__Example:__ $ 6\# = 2 \times 3 \times 5 = 30 $

**(2)** **Primorial** defined as a product of the $ n $ first primes is equivalent to a multiplication of the list of the first $ n $ prime numbers, see OEIS here (link)

__Example:__ $ 4\# = 2 \times 3 \times 5 \times 7 = 210 $

The **primorial** of p is written with the character sharp: p# or $ p\# $

By convention $ 1\# = 1 $

The **primorial** function is the function that at a natural integer $ n $ associates the value $ n\# $

The **primorial** calculation is a succession of multiplication of prime numbers. According to definitions (1) and (2):

__Example:__

n | n# (1) | n# (2) |
---|---|---|

1 | 1 | 2 |

2 | 2 | 6 |

3 | 6 | 30 |

4 | 6 | 210 |

5 | 30 | 2310 |

6 | 30 | 30030 |

7 | 210 | 510510 |

8 | 210 | 9699690 |

9 | 210 | 223092870 |

10 | 210 | 6469693230 |

11 | 2310 | 200560490130 |

… | … | … |

Lists (1) and (2) contain the same numbers but (1) have repeated elements.

dCode retains ownership of the online 'Primorial' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Primorial' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Primorial' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Primorial' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

primorial,prime,product,p,sharp

Source : https://www.dcode.fr/primorial

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'Primorial' tool, so feel free to write! Thank you!