Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Probable prime
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Integers that satisfy a specific condition}} {{distinguish|Provable prime}} In [[number theory]], a '''probable prime''' ('''PRP''') is an [[integer]] that satisfies a specific condition that is satisfied by all [[prime numbers]], but which is not satisfied by most [[composite number]]s. Different types of probable primes have different specific conditions. While there may be probable primes that are composite (called [[pseudoprime]]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 {{nowrap|1 < ''a'' < ''n'' − 1}}). Calculate {{nowrap|''a''<sup>''n'' − 1</sup> [[modular arithmetic|modulo]] ''n''}}. 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 {{nowrap|25 × 10<sup>9</sup>}}, there are 11,408,012,595 odd composite numbers, but only 21,853 pseudoprimes base 2.<ref name="PSW">{{cite journal |author1 = Carl Pomerance |author-link1 = Carl Pomerance |author2 = John L. Selfridge |author-link2 = John L. Selfridge |author3 = Samuel S. Wagstaff, Jr. |author-link3 = Samuel S. Wagstaff, Jr. |title=The pseudoprimes to 25·10<sup>9</sup> |journal=Mathematics of Computation |date=July 1980 |volume=35 |issue=151 |pages=1003–1026 |url=//math.dartmouth.edu/~carlp/PDF/paper25.pdf |jstor=2006210 |doi=10.1090/S0025-5718-1980-0572872-7 |doi-access=free }}</ref>{{rp|1005}} The number of odd primes in the same interval is 1,091,987,404. ==Properties== Probable primality is a basis for efficient [[primality testing]] [[algorithm]]s, which find application in [[cryptography]]. These algorithms are usually [[randomized algorithm|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 ''P<sup>k</sup>'', 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]]s; but it is true for more refined notions of probable primality, such as strong probable primes (''P'' = 1/4, [[Miller–Rabin primality test|Miller–Rabin algorithm]]), or Euler probable primes (''P'' = 1/2, [[Solovay–Strassen primality test|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''<sup>(''p''−1)/2</sup> equals <math>(\tfrac{a}{p})</math> modulo ''p'', where <math>(\tfrac{a}{p})</math> is the [[Jacobi symbol]]. An Euler probable prime which is composite is called an [[Euler–Jacobi pseudoprime]] to base ''a''. The smallest Euler-Jacobi pseudoprime to base 2 is 561.{{r|PSW|p=1004}} There are 11347 Euler-Jacobi pseudoprimes base 2 that are less than 25·10<sup>9</sup>.{{r|PSW|p=1005}} 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<sup>''s''</sup> + 1, where ''d'' is odd. The number ''n'' is a '''strong probable prime''' ('''SPRP''') '''to base''' ''a'' if: : <math>a^d\equiv 1\pmod n,\;</math> or : <math>a^{d\cdot 2^r}\equiv -1\pmod n\text{ for some }0\leq r\leq s-1. \, </math> A composite strong probable prime to base ''a'' is called a [[strong pseudoprime]] 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.{{r|PSW|p=1004}} There are 4842 strong pseudoprimes base 2 that are less than 25·10<sup>9</sup>.{{r|PSW|p=1005}} There are also [[Lucas pseudoprime|Lucas probable prime]]s, which are based on [[Lucas sequence]]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 testing for a strong probably prime=== To test whether 97 is a strong probable prime base 2: * Step 1: Find <math>d</math> and <math>s</math> for which <math>96=d\cdot 2^s</math>, where <math>d</math> is odd ** Beginning with <math>s=0</math>, <math>d</math> would be <math>96</math> ** Increasing <math>s</math>, we see that <math>d=3</math> and <math>s=5</math>, since <math>96=3\cdot 2^5</math> * Step 2: Choose <math>a</math>, <math>1 < a < 97 - 1</math>. We will choose <math>a = 2</math>. * Step 3: Calculate <math>a^d \bmod n</math>, i.e. <math>2^3 \bmod 97</math>. Since it isn't congruent to <math>1</math>, we continue to test the next condition * Step 4: Calculate <math>2^{3\cdot 2^r} \bmod 97</math> for <math>0 \leq r < s</math>. If it is congruent to <math>96</math>, <math>97</math> is probably prime. Otherwise, <math>97</math> is definitely composite ** <math>r=0: 2^3 \equiv 8 \pmod{97}</math> ** <math>r=1: 2^6 \equiv 64 \pmod{97}</math> ** <math>r=2: 2^{12} \equiv 22 \pmod{97}</math> ** <math>r=3: 2^{24} \equiv 96 \pmod{97}</math> * Therefore, <math>97</math> is a strong probable prime base 2 (and is therefore a probable prime base 2). ==See also== * [[Provable prime]] * [[Baillie–PSW primality test]] * [[Euler–Jacobi pseudoprime]] * [[Lucas pseudoprime]] * [[Miller–Rabin primality test]] * [[Perrin number#Perrin primality test|Perrin primality test]] * [[Carmichael number]] ==External links== * [http://primes.utm.edu/glossary/page.php?sort=PRP The prime glossary – Probable prime] * [http://www.primenumbers.net/prptop/ The PRP Top 10000 (the largest known probable primes)] ==References== {{reflist}} {{Prime number classes}} [[Category:Pseudoprimes]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite journal
(
edit
)
Template:Distinguish
(
edit
)
Template:Nowrap
(
edit
)
Template:Prime number classes
(
edit
)
Template:R
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:Short description
(
edit
)