/** This tests strong pseudoprime algorithms with limited bases. see http://miller-rabin.appspot.com/ */ a = 9345883071009581737 //a = 921211727 //a = 377687 //a = 2 a = [2, 299417] //a = [2346211568, 3056093627] a = [11000544, 31481107] a = [2, 325, 9375, 28178, 450775, 9780504, 1795265022] // Sinclair's numbers, found to be good to "at least 2^64" n = 2^64-1 while isStrongPseudoprime[n, a] == isPrime[n] { n = n + 2 } println["Error at $n"]