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:

    Terror is as much a part of the concept of truth as runniness is of the concept of jam. We wouldn’t like jam if it didn’t, by its very nature, ooze. We wouldn’t like truth if it wasn’t sticky, if, from time to time, it didn’t ooze blood.
    Jean Baudrillard (b. 1929)

    Jesus abolished the very concept of “guilt”Mhe denied any cleavage between God and man. He lived this unity of God and man as his “glad tidings” ... and not as a prerogative!
    Friedrich Nietzsche (1844–1900)

    Revolution as an ideal concept always preserves the essential content of the original thought: sudden and lasting betterment.
    Johan Huizinga (1872–1945)