Professional Documents
Culture Documents
ap a (mod p).
1
2 5 PSEUDOPRIMES
Fr jede endliche Gruppe besteht nun ein This follows as x is of the form y + (n)k, so
Fundamentalsatz, welcher der kleine Fermat-
sche Satz genannt zu werden pegt, weil ein
ganz spezieller Teil desselben zuerst von Fer- ax = ay+(n)k = ay (a(n) )k ay 1k ay (mod n).
mat bewiesen worden ist.
In this form, the theorem nds many uses in cryptogra-
(There is a fundamental theorem holding in phy and, in particular, underlies the computations used
every nite group, usually called Fermats little in the RSA public key encryption method.[7] The special
Theorem because Fermat was the rst to have case with n a prime may be considered a consequence of
proved a very special part of it.) Fermats little theorem.
Fermats little theorem is also related to the Carmichael
An early use in English occurs in A.A. Albert, Modern function and Carmichaels theorem, as well as to
Higher Algebra (1937), which refers to the so-called lit- Lagranges theorem in group theory.
tle Fermat theorem on page 206. The algebraic setting of Fermats little theorem can be
generalized to nite elds.
1.1 Further history
Main article: Chinese hypothesis 4 Converse
Some mathematicians independently made the related The converse of Fermats little theorem is not generally
hypothesis (sometimes incorrectly called the Chinese Hy- true, as it fails for Carmichael numbers. However, a
pothesis) that 2p 2 (mod p) if and only if p is a prime. slightly stronger form of the theorem is true, and is known
Indeed, the if part is true, and is a special case of Fer- as Lehmers theorem. The theorem is as follows:
mats little theorem. However, the only if part of this If there exists an a such that
hypothesis is false: for example, 2341 2 (mod 341), but
341 = 11 31 is a pseudoprime. See below.
ap1 1 (mod p)
3 Generalizations
5 Pseudoprimes
Fermats little theorem is a special case of Eulers theo-
rem: for any modulus n and any integer a coprime to n, If a and p are coprime numbers such that a p 1 1 is di-
we have visible by p, then p need not be prime. If it is not, then
3
(p1 ) 8 Notes
gcd ap1 , p =1
a=1 [1] Long 1972, pp. 8788
is either a prime or a Carmichael number. [2] Pettofrezzo & Byrkit 1970, pp. 110111
6 MillerRabin primality test [4] Fermat, Pierre (1894), Tannery, P.; Henry, C., eds.,
Oeuvres de Fermat. Tome 2: Correspondance, Paris:
Gauthier-Villars, pp. 206212 (in French)
The MillerRabin primality test uses the following exten-
sion of Fermats little theorem: [5] Mahoney 1994, p. 295 for the English translation
[8] https://oeis.org/A128311
This result may be deduced from Fermats little theorem
by the fact that, if p is an odd prime, then the integers
modulo p form a nite eld, in which 1 has exactly two
square roots, 1 and 1. 9 References
The MillerRabin test uses this property in the following
way: given p = 2s d + 1, with d odd, an odd integer for Burton, David M. (2011), The History of Mathemat-
which primality has to be tested, choose randomly a such ics / An Introduction (7th ed.), McGraw-Hill, ISBN
that 1 < a < p; then compute b = ad mod p; if b is not 1 978-0-07-338315-6
nor 1, then square it repeatedly modulo p until you get
1, 1, or have squared d times. If b 1 and 1 has not Long, Calvin T. (1972), Elementary Introduction to
been obtained, then p is not prime. Otherwise, p may be Number Theory (2nd ed.), Lexington: D. C. Heath
prime or not. If p is not prime, the probability that this is and Company, LCCN 77171950
proved by the test is higher than 1/4. Therefore, after k
Mahoney, Michael Sean (1994), The Mathemati-
non-conclusive random tests, the probability that p is not
cal Career of Pierre de Fermat, 16011665 (2nd
prime is lower than (3/4)k , and may thus be made as low
ed.), Princeton University Press, ISBN 978-0-691-
as desired, by increasing k.
03666-3
In summary, the test either proves that a number is not
prime, or asserts that it is prime with a probability of er- Ore, Oystein (1988) [1948], Number Theory and Its
ror that may be chosen as low as desired. The test is very History, Dover, ISBN 978-0-486-65620-5
simple to implement and computationally more ecient
than all known deterministic tests. Therefore, it is gener- Pettofrezzo, Anthony J.; Byrkit, Donald R. (1970),
ally used before starting a proof of primality. Elements of Number Theory, Englewood Clis:
Prentice Hall, LCCN 71081766
7 See also
10 Further reading
Fermat quotient
Paulo Ribenboim (1995). The New Book of Prime
Fractions with prime denominators: numbers with Number Records (3rd ed.). New York: Springer-
behavior relating to Fermats little theorem Verlag. ISBN 0-387-94457-5. pp. 2225, 49.
4 11 EXTERNAL LINKS
11 External links
Jnos Bolyai and the pseudoprimes (in Hungarian)
12.2 Images
File:Nuvola_apps_edu_mathematics_blue-p.svg Source: https://upload.wikimedia.org/wikipedia/commons/3/3e/Nuvola_apps_edu_
mathematics_blue-p.svg License: GPL Contributors: Derivative work from Image:Nuvola apps edu mathematics.png and Image:Nuvola
apps edu mathematics-p.svg Original artist: David Vignoni (original icon); Flamurai (SVG convertion); bayo (color)
File:Pierre_de_Fermat.jpg Source: https://upload.wikimedia.org/wikipedia/commons/f/f3/Pierre_de_Fermat.jpg License: Public do-
main Contributors: http://www-groups.dcs.st-and.ac.uk/~{}history/PictDisplay/Fermat.html Original artist: ?