How to resolve the algorithm Sequence of primorial primes step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Sequence of primorial primes step by step in the Phix programming language

Table of Contents

Problem Statement

The sequence of primorial primes is given as the increasing values of n where primorial(n) ± 1 is prime. Noting that the n'th primorial is defined as the multiplication of the smallest n primes, the sequence is of the number of primes, in order that when multiplied together is one-off being a prime number itself.

Generate and show here the first ten values of the sequence.

Show the first twenty members of the series.

Let's start with the solution: