SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Where the GIT's are going

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: kumar who wrote (136343)3/3/2007 1:38:17 AM
From: Lazarus_Long  Read Replies (3) of 225578
 
1. Gloop knows what a prime is????? WOW!

2. Take the square root of the number.
If the square root is an integer, then clearly then original number isn't.
If the square root isn't an integer, then truncate it and divide by that number.
Proceed to decrement that number by 1. Each time you hit a prime, divide the original number by it. If the quotient is an integer, the original number isn't prime. If you reach 1 and haven't determined the number is not prime, it is.

3. As Gloop said, there are also other ways. I believe the above method is called 'Erasthothenes' Sieve'. It was known to the ancient Greeks.

4. Number theorists are crazy. It may be because they have to deal with primes.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext