Fortunate number numbers are prime. Fortunate number A Fortunate number, named after Reo Fortune, is the smallest integer "m" > 1 such that, for a given positive integer "n", "p"# + "m" is a prime number, where the primorial "p"# is the product of the first "n" prime numbers. For example, to find the seventh Fortunate number, one would first calculate the product of the first seven primes (2, 3, 5, 7, 11, 13 and 17), which is 510510. Adding 2 to that gives another even number, while adding 3 would give another multiple of 3. One would similarly rule out the
Prime number this decreases exponentially with the number of tests, it provides high confidence (although not certainty) that a number that passes the repeated test is prime. On the other hand, if the test ever fails, then the number is certainly composite. A composite number that passes such a test is called a pseudoprime. In contrast, some other algorithms guarantee that their answer will always be correct: primes will always be determined to be prime and composites will always be determined to be composite. For instance, this is true of trial division. The algorithms with guaranteed-correct output include both deterministic (non-random) algorithms,