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
(section)
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!
===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).
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)