Here are a few keys
1. Any even is not a prime
2. Any number ending in 5 is not a prime
3. If we can sum the digits and that sum is divisible by 3, the number is not prime
4. If we double the last digit and subtract the remaining part and the result is divisible by 7, the number is divisible by 7
Example : 154
4(2) - 15 = 8 - 15 = - 7
And -7/7 = -1
So.....154 is divisible by 7
5. Alternate the signs on the digits of a number....add these.....if the result is 0 or a number divisible by 11, the number is divisible by 11
Ex : 1331 = +1 - 3 + 3 - 1 = 0 ....so 1331 is divisible by 11
There are probably numerous other "tricks" to test for primeness
However, there is no sure-fire algorithm for testing for primes