HOME

TheInfoList



OR:

In
number theory Number theory (or arithmetic or higher arithmetic in older usage) is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic function, integer-valued functions. German mathematician Carl Friedrich Gauss (1777â ...
, a probable prime (PRP) is an
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
that satisfies a specific condition that is satisfied by all
prime numbers A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
, but which is not satisfied by most
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 other than 1 and itself. Every positive integer is composite, prime, ...
s. Different types of probable primes have different specific conditions. While there may be probable primes that are composite (called
pseudoprime 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 to ...
s), the condition is generally chosen in order to make such exceptions rare. Fermat's test for compositeness, which is based on Fermat's little theorem, works as follows: given an integer ''n'', choose some integer ''a'' that is not a multiple of ''n''; (typically, we choose ''a'' in the range ). Calculate . If the result is not 1, then ''n'' is composite. If the result is 1, then ''n'' is likely to be prime; ''n'' is then called a probable prime to base ''a''. A weak probable prime to base ''a'' is an integer that is a probable prime to base ''a'', but which is not a strong probable prime to base ''a'' (see below). For a fixed base ''a'', it is unusual for a composite number to be a probable prime (that is, a pseudoprime) to that base. For example, up to , there are 11,408,012,595 odd composite numbers, but only 21,853 pseudoprimes base 2. The number of odd primes in the same interval is 1,091,987,404.


Properties

Probable primality is a basis for efficient
primality testing A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating wh ...
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
s, which find application in
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
. These algorithms are usually probabilistic in nature. The idea is that while there are composite probable primes to base ''a'' for any fixed ''a'', we may hope there exists some fixed ''P''<1 such that for ''any'' given composite ''n'', if we choose ''a'' at random, then the probability that ''n'' is pseudoprime to base ''a'' is at most ''P''. If we repeat this test ''k'' times, choosing a new ''a'' each time, the probability of ''n'' being pseudoprime to all the ''a''s tested is hence at most ''Pk'', and as this decreases exponentially, only moderate ''k'' is required to make this probability negligibly small (compared to, for example, the probability of computer hardware error). This is unfortunately false for weak probable primes, because there exist
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; but it is true for more refined notions of probable primality, such as strong probable primes (''P'' = 1/4, Miller–Rabin algorithm), or Euler probable primes (''P'' = 1/2, Solovay–Strassen algorithm). Even when a deterministic primality proof is required, a useful first step is to test for probable primality. This can quickly eliminate (with certainty) most composites. A PRP test is sometimes combined with a table of small pseudoprimes to quickly establish the primality of a given number smaller than some threshold.


Variations

An Euler probable prime to base ''a'' is an integer that is indicated prime by the somewhat stronger theorem that for any prime ''p'', ''a''(''p''−1)/2 equals (\tfrac) modulo ''p'', where (\tfrac) is the
Jacobi symbol Jacobi symbol for various ''k'' (along top) and ''n'' (along left side). Only are shown, since due to rule (2) below any other ''k'' can be reduced modulo ''n''. Quadratic residues are highlighted in yellow — note that no entry with a ...
. An Euler probable prime which is composite is called an
Euler–Jacobi pseudoprime In number theory, an odd integer ''n'' is called an Euler–Jacobi probable prime (or, more commonly, an Euler probable prime) to base ''a'', if ''a'' and ''n'' are coprime, and :a^ \equiv \left(\frac\right)\pmod where \left(\frac\right) is the J ...
to base ''a''. The smallest Euler-Jacobi pseudoprime to base 2 is 561. There are 11347 Euler-Jacobi pseudoprimes base 2 that are less than 25·109. This test may be improved by using the fact that the only square roots of 1 modulo a prime are 1 and −1. Write ''n'' = ''d'' Â· 2''s'' + 1, where ''d'' is odd. The number ''n'' is a strong probable prime (SPRP) to base ''a'' if: : a^d\equiv 1\pmod n,\; or : a^\equiv -1\pmod n\text0\leq r\leq s-1. \, A composite strong probable prime to base ''a'' is called a
strong pseudoprime A strong pseudoprime is a composite number that passes the Miller–Rabin primality test. All prime numbers pass this test, but a small fraction of composites also pass, making them "pseudoprimes". Unlike the Fermat pseudoprimes, for which there ex ...
to base ''a''. Every strong probable prime to base ''a'' is also an Euler probable prime to the same base, but not vice versa. The smallest strong pseudoprime base 2 is 2047. There are 4842 strong pseudoprimes base 2 that are less than 25·109. There are also Lucas probable primes, which are based on
Lucas sequence In mathematics, the Lucas sequences U_n(P,Q) and V_n(P, Q) are certain constant-recursive integer sequences that satisfy the recurrence relation : x_n = P \cdot x_ - Q \cdot x_ where P and Q are fixed integers. Any sequence satisfying this recu ...
s. A Lucas probable prime test can be used alone. The Baillie–PSW primality test combines a Lucas test with a strong probable prime test.


Example of SPRP

To test whether 97 is a strong probable prime base 2: * Step 1: Find d and s for which 96=d\cdot 2^s, where d is odd ** Beginning with s=0, d would be 96 ** Increasing s, we see that d=3 and s=5, since 96=3\cdot 2^5 * Step 2: Choose a, 1 < a < 97 - 1. We will choose a = 2. * Step 3: Calculate a^d \bmod n, i.e. 2^3 \bmod 97. Since it isn't congruent to 1, we continue to test the next condition * Step 4: Calculate 2^ \bmod 97 for 0 \leq r < s. If it is congruent to 96, 97 is probably prime. Otherwise, 97 is definitely composite ** r=0: 2^3 \equiv 8 \pmod ** r=1: 2^6 \equiv 64 \pmod ** r=2: 2^ \equiv 22 \pmod ** r=3: 2^ \equiv 96 \pmod * Therefore, 97 is a strong probable prime base 2 (and is therefore a probable prime base 2).


See also

* Baillie–PSW primality test *
Euler–Jacobi pseudoprime In number theory, an odd integer ''n'' is called an Euler–Jacobi probable prime (or, more commonly, an Euler probable prime) to base ''a'', if ''a'' and ''n'' are coprime, and :a^ \equiv \left(\frac\right)\pmod where \left(\frac\right) is the J ...
*
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 ...
*
Lucas pseudoprime Lucas pseudoprimes and Fibonacci pseudoprimes are composite integers that pass certain tests which all primes and very few composite numbers pass: in this case, criteria relative to some Lucas sequence. Baillie-Wagstaff-Lucas pseudoprimes Baill ...
*
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 ...
*
Provable prime In number theory, a provable prime is an integer that has been calculated to be prime using a primality-proving algorithm. Boot-strapping techniques using Pocklington primality test are the most common ways to generate provable primes for cryptogra ...


External links


The prime glossary – Probable prime

The PRP Top 10000 (the largest known probable primes)


References

{{Prime number classes Pseudoprimes