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)

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day! You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!

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)

Answers to Questions

How to calculate a primorial?

The term primorial refers to two separate definitions:

'(1) Primorial defined as the product of all prime numbers inferior or equal to n is a simple multiplication conditioned par a primality test of the numbers inferior or equal to n.

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 primes.

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

In both cases, the primorial of p is written with the character sharp: p# or \( p\# \)

By convention \( 1\# = 1 \)

Ask a new question

Source code

dCode retains ownership of the source code of the script Primorial online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the online Primorial script for offline use, for you, your company or association, see you on contact page !

dCode uses cookies to customize the site content, analyze user behavior and adapt dCode to your use. Some data is stored and collected for advertising purposes and may be shared with our partners. OK