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
Primality test
(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!
== Heuristic tests == These are tests that seem to work well in practice, but are unproven and therefore are not, technically speaking, algorithms at all. The [[Fermat primality test]] and the Fibonacci test are simple examples, and they are effective when combined. [[John Selfridge]] has conjectured that if ''p'' is an odd number, and ''p'' β‘ Β±2 (mod 5), then ''p'' will be prime if both of the following hold: * 2<sup>''p''β1</sup> β‘ 1 (mod ''p''), * ''f''<sub>''p''+1</sub> β‘ 0 (mod ''p''), where ''f<sub>k</sub>'' is the ''k''-th [[Fibonacci number]]. The first condition is the Fermat primality test using base 2. In general, if ''p'' β‘ a (mod ''x''<sup>2</sup>+4), where ''a'' is a quadratic non-residue (mod ''x''<sup>2</sup>+4) then ''p'' should be prime if the following conditions hold: * 2<sup>''p''β1</sup> β‘ 1 (mod ''p''), * ''f''(''1'')<sub>''p''+1</sub> β‘ 0 (mod ''p''), ''f''(''x'')<sub>''k''</sub> is the ''k''-th [[Fibonacci polynomial]] at ''x''. Selfridge, [[Carl Pomerance]] and [[Samuel Wagstaff]] together offer $620 for a counterexample.<ref>[[John Selfridge#Selfridge's conjecture about primality testing]].</ref>
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)