Definition
A Fortunate number is the smallest integer m > 1 such that for a given positive integer n, primorial(n) + m is a prime number, where primorial(n) is the product of the first n prime numbers.

For example the first fortunate number is 3 because primorial(1) is 2 and 2 + 3 = 5 which is prime whereas 2 + 2 = 4 is composite.



Task
After sorting and removal of any duplicates, compute and show on this page the first 8 Fortunate numbers or, if your language supports big integers, the first 50 Fortunate numbers.



Related task
 Primorial numbers


See also
 oeis:A005235 Fortunate numbers 
 oeis:A046066 Fortunate numbers, sorted with duplicates removed


with javascript_semantics
include mpfr.e
mpz primorial = mpz_init(1),
    pj = mpz_init()
sequence fortunates = {}
for p=1 to 75 do
    mpz_mul_si(primorial,primorial,get_prime(p))
    integer j = 3
    mpz_add_si(pj,primorial,3)
    while not mpz_prime(pj) do
        mpz_add_si(pj,pj,2)
        j = j + 2
    end while
    fortunates &= j
end for
fortunates = unique(deep_copy(fortunates))[1..50]
fortunates = join_by(apply(true,sprintf,{{"%3d"},fortunates}),1,10)
printf(1,"The first 50 distinct fortunate numbers are:\n%s\n",{fortunates})
