Jacobi Symbol - Primality Testing

Primality Testing

There is another way the Jacobi and Legendre symbols differ. If the Euler criterion formula is used modulo a composite number, the result may or may not be the value of the Jacobi symbol.

So if it's not known whether a number n is prime or composite, we can pick a random number a, calculate the Jacobi symbol and compare it with Euler's formula; if they differ modulo n, then n is composite; if they're the same modulo n for many different values of a, then n is "probably prime".

This is the basis for the probabilistic Solovay–Strassen primality test and its refinement the Miller–Rabin primality test.

Read more about this topic:  Jacobi Symbol

Famous quotes containing the word testing:

    No testing has overtaken you that is not common to everyone. God is faithful, and he will not let you be tested beyond your strength, but with the testing he will also provide the way out so that you may be able to endure it.
    Bible: New Testament, 1 Corinthians 10:13.