[algogeeks] Re: finding whether the number is prime or not ...

2009-03-23 Thread Miroslav Balaz
That is not true, there are carmichaels numbers that are 32bit..., but there is another priamlity testing algorithm, that is log n, and uses something like fermat therorem, that you can do form 2,3,5 and it works under 20 000 000. I dont remeber how the test is done, but maybe it is that you do f

[algogeeks] Re: finding whether the number is prime or not ...

2009-03-23 Thread Amal
Is there any proof for this ? On Fri, Jun 27, 2008 at 7:29 AM, Arunachalam wrote: > What is the maximum value of number that you need to find out? > > A 32 bit number is prime if it satisfies the Fermat's theorem for 2,3,5,7 > and 11. This is the fastest way to find out whether a number is prime