*** Welcome to piglix ***

Lucas pseudoprime


Lucas pseudoprimes and Fibonacci pseudoprimes are composite integers that pass certain tests which all primes and very few composite numbers pass: in this case, criteria relative to some Lucas sequence.

Given integers P and Q, where P > 0 and , let Uk(P, Q) and Vk(P, Q) be the corresponding Lucas sequences.

Let n be a positive integer and let be the Jacobi symbol. We define

If n is a prime such that the greatest common divisor of n and Q (that is, GCD(n, Q)) is 1, then the following congruence condition holds:

If this equation does not hold, then n is not prime. If n is composite, then this equation usually does not hold. These are the key facts that make Lucas sequences useful in primality testing.


...
Wikipedia

...