Primality testing via Fermat's Little Theorem:
256 |
Factoring n might take a lot longer:
3^2 * 378833691382228224467116742566455233 |
False |
Finding all Carmichael numbers up to 7000:
561 1105 1729 2465 2821 6601 |
We can check for a given number n, what percentage of 1<= a<n are witnesses that n is not prime:
|
0.968641114983 |
0.789473684211 |
0.99504950495 |
|