Removes powers of two from a number, n, then factorises as 2^s * d for Miller-Rabin test