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, Théophile Pépin.
Contents
Description of the test
Let
The expression
Other bases may be used in place of 3, for example 5, 6, 7, 10, 12, 14, 20, 24, 27, 28, 39, 40, 41, 45, 48 (sequence A129802 in the OEIS).
Proof of correctness
Sufficiency: assume that the congruence
holds. Then
Necessity: assume that
where
Historical Pépin tests
Because of the sparsity of the Fermat numbers, the Pépin test has only been run eight times (on Fermat numbers whose primality statuses were not already known). Mayer, Papadopoulos and Crandall speculate that in fact, because of the size of the still undetermined Fermat numbers, it will take decades before technology allows any more Pépin tests to be run. As of 2016 the smallest untested Fermat number with no known prime factor is