# how to determine if a number is prime number??

• Sep 2nd 2009, 09:27 AM
kenny1999
how to determine if a number is prime number??
actually my way to determine if a number is a prime number is by trial and error test.

For example given a number 91, to see whether it is a prime number or not i try to use prime number like 3,5,7,11,13,17 etc to see if it can divide 91 without reminder.

but is there any explanation to why it is? or is there any other more systematic method? Because i need to explain to my students.

By the way, i would like to ask what is the mathematical significance (or simply why we should do) "prime factorization"?
• Sep 2nd 2009, 09:31 AM
Jameson
Testing "n" for being prime is an ongoing problem in math, I believe. There are a number of algorithms that speed up the process for larger numbers (like 2,000 digits long), but there is no magic way to know. If you are teaching below college level math, I doubt these methods will be useful for you.

You can look at this Wiki page to see some examples: Primality test

If you do brute force calculations for "n" being prime, you only need to test factors up to the $\sqrt{n}$.