You are not logged in.
Introduction
The following is a way to find out if (a) is prime or not using Fermat's Little Theorem.
Rule
will be factorable by all primes <square root a if a is prime, otherwise it won't be.Theory
Fermat's little theorem states that if p is a prime number, then for any integer a, the number
is an integer multiple of p.Example
a=37
x=(2-1)(3-1)(5-1)=8
a=21
x=(2-1)(3-1)=2
Conclusion
I don't know but I would have thought this method would be useful for computers as it only requires a few computations. Don't computers usually have to factor possible factors separately? The numbers are very large though.
"Time not important. Only life important." - The Fifth Element 1997
Offline
Hi;
It is generally considered too slow to factor very large primes using Fermat.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Oh! Fair enough.
"Time not important. Only life important." - The Fifth Element 1997
Offline
Using Fermat is very fast however this prime test is not deterministic but probabilistic. There are composite numbers that pass this test called pseudoprimes.
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Offline
What if you used the prime as the base? It would be impossible for it to be factorable by factors of a composite because you are minusing 1.
"Time not important. Only life important." - The Fifth Element 1997
Offline
I'm not sure what you mean, can you give an example?
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Offline
Well usually you'd do
where x=(2-1)(3-1)(5-1)(7-1) and it would be factorable by 2,3,5,7........"Time not important. Only life important." - The Fifth Element 1997
Offline
That won't solve the problem of the pseudoprimes. You can use different bases to eliminate most pseudoprimes but some are pseudo for all bases co-prime to p.
These are called Carmichael Numbers.
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Offline
No way! That's not awesome.
"Time not important. Only life important." - The Fifth Element 1997
Offline