Pépin's test

Pépin's test

In mathematics, Pépin's test is a primality test, which can be used to determine whether a Fermat number is prime. It is a variant of Proth's test. The test is named for a French mathematician, P. Pépin.

Description of the test

Let F_n=2^{2^n}+1 be the "n"th Fermat number. Pépin's test states that if "n" is non-zero,:F_n is prime if and only if 3^{(F_n-1)/2}equiv-1pmod{F_n}.The expression 3^{(F_n-1)/2} can be evaluated modulo F_n by repeated squaring. This makes the test a fast polynomial-time algorithm. However, Fermat numbers grow so rapidly that only a handful of Fermat numbers can be tested in a reasonable amount of time and space.

Other bases may be used in place of 3, for example 5, 6, 7, or 10 OEIS|id=A129802.

Proof of correctness

For one direction, assume that the congruence:3^{(F_n-1)/2}equiv-1pmod{F_n}holds. Then 3^{F_n-1}equiv1pmod{F_n}, thus the multiplicative order of 3 modulo F_n divides F_n-1=2^{2^n}, which is a power of two. On the other hand, the order does not divide (F_n-1)/2, and therefore it must be equal to F_n-1. In particular, there are at least F_n-1 numbers below F_n coprime to F_n, and this can happen only if F_n is prime.

For the other direction, assume that F_n is prime. By Euler's criterion,:3^{(F_n-1)/2}equivleft(frac3{F_n} ight)pmod{F_n},where left(frac3{F_n} ight) is the Legendre symbol. By repeated squaring, we find that 2^{2^n}equiv1pmod3, thus F_nequiv2pmod3, and left(frac{F_n}3 ight)=-1.As F_nequiv1pmod4, we conclude left(frac3{F_n} ight)=-1 from the law of quadratic reciprocity.

References

* P. Pépin, "Sur la formule 2^{2^n}+1", "Comptes Rendus Acad. Sci. Paris" 85 (1877), pp. 329–333.

External links

* [http://primes.utm.edu/glossary/page.php?sort=PepinsTest The Prime Glossary: Pepin's test]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Test de Pépin — En matemáticas, el test de Pépin (por el matemático francés P. Pépin) es un test de primalidad que se puede emplear para determinar si un número de Fermat es primo. Es una variante del test de Proth. Contenido 1 Descripción del test 2… …   Wikipedia Español

  • Pépin-Test — Der Pépin Test ist ein Primzahltest für Fermat Zahlen. Er prüft, ob natürliche Zahlen der Form prim sind oder nicht. Grundlage für den Pépin Test sind Arbeiten von Théophile Pépin (1826 – 1904), François Proth (1852 – 1879) und Édouard Lucas.… …   Deutsch Wikipedia

  • Pepin-Test — Unter dem Pepin Test versteht man einen Primzahltest. Der Pepin Test überprüft Fermatsche Zahlen, das sind natürliche Zahlen der Form darauf, ob sie eine Primzahl sind oder nicht. Grundlage für den Pepin Test sind Arbeiten, die auf Édouard Lucas… …   Deutsch Wikipedia

  • Test de primalidad — El 39º número primo de Mersenne era el mayor conocido hasta la fecha de creación de este artículo. La cuestión de la determinación de si un número n …   Wikipedia Español

  • AKS primality test — The AKS primality test (also known as Agrawal–Kayal–Saxena primality test and cyclotomic AKS test) is a deterministic primality proving algorithm created and published by three Indian Institute of Technology Kanpur computer scientists, Manindra… …   Wikipedia

  • Lucas–Lehmer test for Mersenne numbers — This article is about the Lucas–Lehmer test (LLT), that only applies to Mersenne numbers. There is also a Lucas Lehmer Riesel test for numbers of the form N=k 2^n 1, with 2^n > k, based on the LLT: see Lucas Lehmer Riesel test. There is also a… …   Wikipedia

  • Prix Pépin — Pour les articles homonymes, voir Pépin. Le prix Pépin est un prix littéraire français, créé par Pierre Gévart et décerné depuis 2005, qui récompense de courtes nouvelles de science fiction d une taille maximale de 300 signes, espaces comprises.… …   Wikipédia en Français

  • Prix Pepin — Prix Pépin Pour les articles homonymes, voir Pépin. Cet article fait partie de l …   Wikipédia en Français

  • Primality test — A primality test is an algorithm for determining whether an input number is prime. Amongst other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating… …   Wikipedia

  • Miller–Rabin primality test — The Miller–Rabin primality test or Rabin–Miller primality test is a primality test: an algorithm which determines whether a given number is prime, similar to the Fermat primality test and the Solovay–Strassen primality test. Its original version …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”