How can i figure out witch numbers are prime and witch ones are not.

say i give you a list of some like 202 205 211 228 and 235 and ask you to find the smallest prime number how would i go about testing each one?

Printable View

- Jan 5th 2010, 02:47 AMWardPrime Numbers
How can i figure out witch numbers are prime and witch ones are not.

say i give you a list of some like 202 205 211 228 and 235 and ask you to find the smallest prime number how would i go about testing each one? - Jan 5th 2010, 03:12 AMCaptainBlack
First discard all the evens, they can't be prime. Then those divisible by 5.

That leaves 211 which may be prime. Now check it it is divisible by 3, 7, 11, 13 if it isn't then it is prime (you check its divisibility by all primes less than or equal to its square root, but you have already dealt with 2 and 5 so no need to do those again)

The result that we are using is that if a number is composite then it has a divisor less than (or equal to) its square root.

CB - Jan 5th 2010, 03:39 AMWard
ok, then whats a fast way to figure out its square root in your head.

Sorry for sounding stupid, i just havn't ever had it explained to me and i need to know how to do it for the asvab test. - Jan 5th 2010, 04:05 AMCaptainBlack