exercise 1.28 miller-rabin-test