For example , to run Lucas ' primality test requires the knowledge of the prime factors of n − 1 , while the Lucas-Lehmer primality test needs the prime factors of n + 1 as input .
But it is less complicated than methods used for very large primes , like Fermat 's primality test ( a primality test is to test whether a number is prime or not ) or the Miller-Rabin primality test .