Faster is_prob_prime (faster composite check, rewrite of Lucas)