Prime number checking and detection of prime numbers