Tests for primes