Gapplet

Take a finite number of primes p1, ..., pn. According to the proof of the theorem, a new prime occurs among the divisors of p1 ··· pn + 1.

Input a sequence of numbers p1, ..., pn
e.g., 2, 3, 5, 7, 11, 24
 
 
Find a divisor of p1···pn+1
which is a prime distinct from each pi