coinflip and next_prime