Divide the number by all prime numbers from 2 up to the prime number less than the square root of the number.
It any division produces an integer, the number is composite.
It any division produces an integer, the number is composite.
-
As far as I can tell, you have to use "number sense". You can usually tell if something is prime to a fair amount of digits after a while.
But as a general rule for primes greater than 2:
A prime number will end in an uneven number, but not all uneven numbers are prime. If the number ends in 0, 2, 4, 6, or 8, it is definitely not prime.
It might also help to know a bit of number theory;
If the digits in a certain number are added and is divisible by some number, then...
Those kind of things.
But as a general rule for primes greater than 2:
A prime number will end in an uneven number, but not all uneven numbers are prime. If the number ends in 0, 2, 4, 6, or 8, it is definitely not prime.
It might also help to know a bit of number theory;
If the digits in a certain number are added and is divisible by some number, then...
Those kind of things.
-
There is no precise formula for calculating a prime number. But there are programs that calculate it probably going through each of the number's factors one by one which would take forever for large numbers for a human to do.
Here's a link to one of them: http://www.math.com/students/calculators/source/prime-number.htm
Of course, you wouldn't be able to use this during a test, but it would be the fastest and most effective way for all other situations.
Here's a link to one of them: http://www.math.com/students/calculators/source/prime-number.htm
Of course, you wouldn't be able to use this during a test, but it would be the fastest and most effective way for all other situations.
-
You can try the Miller-Rabin Test:
http://en.wikipedia.org/wiki/Miller%E2%8…
http://en.wikipedia.org/wiki/Miller%E2%8…
-
For small ones, memorize them
For very large ones there isn't yet a good method of testing. The person who discovers such a method will win many prizes in mathematics.
For very large ones there isn't yet a good method of testing. The person who discovers such a method will win many prizes in mathematics.
-
Memorize your prime numbers.
-
lol id like to know also
cause it get annoying when dividing and they figuring out if its prime out not
cause it get annoying when dividing and they figuring out if its prime out not