modify function rotate_number.We don't need to yield n itself, since it is
already a prime number