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 .