exercise 27
exercise 28: Miller-Rabin Test