Strong pseudoprime
   HOME

TheInfoList



OR:

A strong pseudoprime is a
composite number A composite number is a positive integer that can be formed by multiplying two smaller positive integers. Equivalently, it is a positive integer that has at least one divisor In mathematics, a divisor of an integer n, also called a factor ...
that passes the
Miller–Rabin primality test The Miller–Rabin primality test or Rabin–Miller primality test is a probabilistic primality test: an algorithm which determines whether a given number is likely to be prime, similar to the Fermat primality test and the Solovay–Strassen prim ...
. All prime numbers pass this test, but a small fraction of composites also pass, making them "
pseudoprimes A pseudoprime is a probable prime (an integer that shares a property common to all prime numbers) that is not actually prime. Pseudoprimes are classified according to which property of primes they satisfy. Some sources use the term pseudoprime t ...
". Unlike the
Fermat pseudoprime In number theory, the Fermat pseudoprimes make up the most important class of pseudoprimes that come from Fermat's little theorem. Definition Fermat's little theorem states that if ''p'' is prime and ''a'' is coprime to ''p'', then ''a'p''− ...
s, for which there exist numbers that are
pseudoprimes A pseudoprime is a probable prime (an integer that shares a property common to all prime numbers) that is not actually prime. Pseudoprimes are classified according to which property of primes they satisfy. Some sources use the term pseudoprime t ...
to all
coprime In mathematics, two integers and are coprime, relatively prime or mutually prime if the only positive integer that is a divisor of both of them is 1. Consequently, any prime number that divides does not divide , and vice versa. This is equivale ...
bases (the
Carmichael numbers In number theory, a Carmichael number is a composite number n, which in modular arithmetic satisfies the congruence relation: :b^n\equiv b\pmod for all integers b. The relation may also be expressed in the form: :b^\equiv 1\pmod. for all integer ...
), there are no composites that are strong pseudoprimes to all bases.


Motivation and first examples

Let us say we want to investigate if ''n'' = 31697 is a probable prime (PRP). We pick base ''a'' = 3 and, inspired by
Fermat's little theorem Fermat's little theorem states that if ''p'' is a prime number, then for any integer ''a'', the number a^p - a is an integer multiple of ''p''. In the notation of modular arithmetic, this is expressed as : a^p \equiv a \pmod p. For example, if = ...
, calculate: : 3^ \equiv 1 \pmod This shows 31697 is a Fermat PRP (base 3), so we may suspect it is a prime. We now repeatedly halve the exponent: : 3^ \equiv 1 \pmod : 3^ \equiv 1 \pmod : 3^ \equiv 28419 \pmod The first couple of times do not yield anything interesting (the result was still 1 modulo 31697), but at exponent 3962 we see a result that is neither 1 nor minus 1 (i.e. 31696) modulo 31697. This proves 31697 is in fact composite (it equals 29×1093). Modulo a prime, the residue 1 can have no other square roots than 1 and minus 1. This shows that 31697 is not a strong pseudoprime to base 3. For another example, pick ''n'' = 47197 and calculate in the same manner: : 3^ \equiv 1 \pmod : 3^ \equiv 1 \pmod : 3^ \equiv 1 \pmod In this case, the result continues to be 1 (mod 47197) until we reach an odd exponent. In this situation, we say that 47197 is a strong probable prime to base 3. Because it turns out this PRP is in fact composite (can be seen by picking other bases than 3), we have that 47197 is a strong pseudoprime to base 3. Finally, consider ''n'' = 74593 where we get: : 3^ \equiv 1 \pmod : 3^ \equiv 1 \pmod : 3^ \equiv 74592 \pmod Here, we reach minus 1 modulo 74593, a situation that is perfectly possible with a prime. When this occurs, we stop the calculation (even though the exponent is not odd yet) and say that 74593 is a strong probable prime (and, as it turns out, a strong pseudoprime) to base 3.


Formal definition

An odd composite number ''n'' = ''d'' · 2''s'' + 1 where ''d'' is odd is called a strong (Fermat) pseudoprime to base ''a'' if: : a^d\equiv 1\pmod n or : a^\equiv -1\pmod n\quad\mbox0 \leq r < s . (If a number ''n'' satisfies one of the above conditions and we don't yet know whether it is prime, it is more precise to refer to it as a strong probable prime to base ''a''. But if we know that ''n'' is not prime, then we may use the term strong pseudoprime.) The definition is trivially met if so these trivial bases are often excluded. Guy mistakenly gives a definition with only the first condition, which is not satisfied by all primes.


Properties of strong pseudoprimes

A strong pseudoprime to base ''a'' is always an Euler–Jacobi pseudoprime, an Euler pseudoprime and a
Fermat pseudoprime In number theory, the Fermat pseudoprimes make up the most important class of pseudoprimes that come from Fermat's little theorem. Definition Fermat's little theorem states that if ''p'' is prime and ''a'' is coprime to ''p'', then ''a'p''− ...
to that base, but not all Euler and Fermat pseudoprimes are strong pseudoprimes.
Carmichael number In number theory, a Carmichael number is a composite number n, which in modular arithmetic satisfies the congruence relation: :b^n\equiv b\pmod for all integers b. The relation may also be expressed in the form: :b^\equiv 1\pmod. for all integers ...
s may be strong pseudoprimes to some bases—for example, 561 is a strong pseudoprime to base 50—but not to all bases. A composite number ''n'' is a strong pseudoprime to at most one quarter of all bases below ''n''; thus, there are no "strong Carmichael numbers", numbers that are strong pseudoprimes to all bases. Thus given a random base, the probability that a number is a strong pseudoprime to that base is less than 1/4, forming the basis of the widely used
Miller–Rabin primality test The Miller–Rabin primality test or Rabin–Miller primality test is a probabilistic primality test: an algorithm which determines whether a given number is likely to be prime, similar to the Fermat primality test and the Solovay–Strassen prim ...
. The true probability of a failure is generally vastly smaller.
Paul Erdos Paul may refer to: * Paul (given name), a given name (includes a list of people with that name) *Paul (surname), a list of people People Christianity *Paul the Apostle (AD c.5–c.64/65), also known as Saul of Tarsus or Saint Paul, early Chri ...
and
Carl Pomerance Carl Bernard Pomerance (born 1944 in Joplin, Missouri) is an American number theorist. He attended college at Brown University and later received his Ph.D. from Harvard University in 1972 with a dissertation proving that any odd perfect number ...
showed in 1986 that if a random integer n passes the Miller–Rabin primality test to a random base b, then n is
almost surely In probability theory, an event is said to happen almost surely (sometimes abbreviated as a.s.) if it happens with probability 1 (or Lebesgue measure 1). In other words, the set of possible exceptions may be non-empty, but it has probability 0. ...
a prime. For example, of the first 25,000,000,000 positive integers, there are 1,091,987,405 integers that are probable primes to base 2, but only 21,853 of them are pseudoprimes, and even fewer of them are strong pseudoprimes, as the latter is a subset of the former. However, Arnault gives a 397-digit Carmichael number that is a strong pseudoprime to every base less than 307. One way to reduce the chance that such a number is wrongfully declared probably prime is to combine a strong probable prime test with a Lucas probable prime test, as in the
Baillie–PSW primality test The Baillie–PSW primality test is a probabilistic primality testing algorithm that determines whether a number is composite or is a probable prime. It is named after Robert Baillie, Carl Pomerance, John Selfridge, and Samuel Wagstaff. The Baill ...
. There are infinitely many strong pseudoprimes to any base.


Examples

The first strong pseudoprimes to base 2 are :2047, 3277, 4033, 4681, 8321, 15841, 29341, 42799, 49141, 52633, 65281, 74665, 80581, 85489, 88357, 90751, ... . The first to base 3 are :121, 703, 1891, 3281, 8401, 8911, 10585, 12403, 16531, 18721, 19345, 23521, 31621, 44287, 47197, 55969, 63139, 74593, 79003, 82513, 87913, 88573, 97567, ... . The first to base 5 are :781, 1541, 5461, 5611, 7813, 13021, 14981, 15751, 24211, 25351, 29539, 38081, 40501, 44801, 53971, 79381, ... . For base 4, see , and for base 6 to 100, see to . By testing the above conditions to several bases, one gets somewhat more powerful primality tests than by using one base alone. For example, there are only 13 numbers less than 25·109 that are strong pseudoprimes to bases 2, 3, and 5 simultaneously. They are listed in Table 7 of. The smallest such number is 25326001. This means that, if ''n'' is less than 25326001 and ''n'' is a strong probable prime to bases 2, 3, and 5, then ''n'' is prime. Carrying this further, 3825123056546413051 is the smallest number that is a strong pseudoprime to the 9 bases 2, 3, 5, 7, 11, 13, 17, 19, and 23. So, if ''n'' is less than 3825123056546413051 and ''n'' is a strong probable prime to these 9 bases, then ''n'' is prime. By judicious choice of bases that are not necessarily prime, even better tests can be constructed. For example, there is no composite < 2^ that is a strong pseudoprime to all of the seven bases 2, 325, 9375, 28178, 450775, 9780504, and 1795265022.


Smallest strong pseudoprime to base ''a''


References

{{Classes of natural numbers Pseudoprimes