Content deleted Content added
No edit summary Tags: Reverted Visual edit Mobile edit Mobile web edit |
CheeseyHead (talk | contribs) Some fixes |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
{{distinguish|Provable prime}}
In [[number theory]], a '''probable prime''' ('''PRP
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''
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==
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
Line 18:
==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''.
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>
Line 30:
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.
===Example of
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
Line 50:
* [[Baillie–PSW primality test]]
* [[Euler–Jacobi pseudoprime]]
* [[Carmichael number]]▼
* [[Lucas pseudoprime]]
* [[Miller–Rabin primality test]]
* [[Perrin number#Perrin primality test|Perrin primality test]]
▲* [[Carmichael number]]
==External links==
|