Fermat Primality Test - Concept

Concept

Fermat's little theorem states that if p is prime and, then

If we want to test if p is prime, then we can pick random a's in the interval and see if the equality holds. If the equality does not hold for a value of a, then p is composite. If the equality does hold for many values of a, then we can say that p is probable prime.

It might be in our tests that we do not pick any value for a such that the equality fails. Any a such that

when n is composite is known as a Fermat liar. Vice versa, in this case n is called Fermat pseudoprime to base a.

If we do pick an a such that

then a is known as a Fermat witness for the compositeness of n.

Read more about this topic:  Fermat Primality Test

Famous quotes containing the word concept:

    Behind the concept of woman’s strangeness is the idea that a woman may do anything: she is below society, not bound by its law, unpredictable; an attribute given to every member of the league of the unfortunate.
    Christina Stead (1902–1983)

    I think that Richard Nixon will go down in history as a true folk hero, who struck a vital blow to the whole diseased concept of the revered image and gave the American virtue of irreverence and skepticism back to the people.
    William Burroughs (b. 1914)

    Obscenity is a moral concept in the verbal arsenal of the Establishment, which abuses the term by applying it, not to expressions of its own morality, but to those of another.
    Herbert Marcuse (1898–1979)