Determine prime number quality