For an integer and a prime number, if , then .
This useful result is in a sense trivial, since the ring is a finite field, with group of units of order ; it is just a matter of recalling for all in a finite group . For the same reason, for any nonzero in a finite field with elements.
A stronger result is that the group of units of a finite field with elements is cyclic of order , or indeed that every finite subgroup of the group of units of any field is cyclic. A proof may be found here.
If is a commutative -algebra, then the map is an algebra endomorphism (the preservation of addition follows easily from the binomial theorem and the fact that when ; apparently this is also known as the freshman's dream). It follows that is a field automorphism on a field with elements, since after all
for any . See also Frobenius automorphism.
Fermat’s little theorem says that in order for a positive integer to be prime, it is necessary that for any integer (one may as well assume ). This gives a way of showing that an integer is not prime (by finding an less than such that ) that, especially for large , is more efficient than actually factoring .
One type of (probabilistic) primality test for is to take a base, for example , and check whether . Chances are good that is in fact prime if this is satisfied, although there certainly exist composite numbers which pass this test (called pseudoprimes base ). The smallest pseudoprime base is . One effective primality test for “small” (e.g., less than ) is to use such a primality test coupled with a table of pseudoprimes.
There are numbers such as which are pseudoprimes in any base; these are called Carmichael numbers. A positive integer is Carmichael iff it is square-free and for each prime divisor of , we have that is a divisor of . They are comparatively rare, but it is known there are infinitely many (for sufficiently large , there are at least Carmichael numbers between and ).
A generalization of Fermat’s little theorem can be used to give a deterministic test for primality that can be carried out on any integer in “polynomial time” (bounded by a polynomial applied to the number of digits of ); it was first published only as recently as 2002.
An integer is prime if and only if
for every or even any coprime to (so that, for example, the case would be a sufficient criterion for primality).
By the argument at freshman’s dream, primality of is equivalent to (for every or any ), and then primality of implies the further reduction by Fermat’s little theorem.
Given an integer , and an integer relatively prime to , let denote the order of as a unit in . We let denote the base logarithm of , and denotes the Euler totient function (so is the cardinality of the group of units of ).
(Agrawal, Kayal, Saxena) For given , let be the least positive integer such that . Then is prime if and only if either
and whenever , either or , or
and whenever is an integer such that , we have
From this result, one can extract an algorithm that decides primality of in time bounded by a polynomial in , invoking help from the following result.
For each there exists such that .
These results form the basis for the first algorithm for deciding primality that is general (applies to any integer ), runs in polynomial time, is deterministic (other known efficient tests were randomized and only guaranteed high probability of primality), and unconditional (does not depend on conjectured number-theoretic results such as forms of the Riemann hypothesis).
Named after Pierre de Fermat.
Last revised on August 10, 2014 at 05:18:18. See the history of this page for a list of all contributions to it.