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:

    The two most far-reaching critical theories at the beginning of the latest phase of industrial society were those of Marx and Freud. Marx showed the moving powers and the conflicts in the social-historical process. Freud aimed at the critical uncovering of the inner conflicts. Both worked for the liberation of man, even though Marx’s concept was more comprehensive and less time-bound than Freud’s.
    Erich Fromm (1900–1980)

    The nearer a conception comes towards finality, the nearer does the dynamic relation, out of which this concept has arisen, draw to a close. To know is to lose.
    —D.H. (David Herbert)

    The concept of a person is logically prior to that of an individual consciousness. The concept of a person is not to be analysed as that of an animated body or an embodied anima.
    Sir Peter Frederick Strawson (b. 1919)