Avoid repeating bases in MillerRabin.

There are only 168 low primes in that list.

Also, you only seem to be doing 5 rounds of MR,
    
    t := 10
    t = (t+1)>>1

Doesn't seem like enough.