3 comments

  • apnorton1 hour ago
    The linked post points to OEIS A014233[1] for establishing their set of Miller-Rabin[2] bases, though it&#x27;s actually possible to find smaller sets.<p>I remember asking about this on StackExchange some years ago [3], which pointed me to Wojciech Izykowski&#x27;s site[4], on which &quot;best known&quot; base sets are tracked. For example, instead of considering the four bases {2,3,5,7} to cover all 32-bit integers, it would suffice to consider the three integers {4230279247111683200, 14694767155120705706, 16641139526367750375}.<p>This becomes more interesting the higher the bound you seek --- for example, instead of checking the first 11 prime bases for 64-bit integers, you only need to check the seven bases: 2, 325, 9375, 28178, 450775, 9780504, 1795265022.<p>[1]: <a href="https:&#x2F;&#x2F;oeis.org&#x2F;A014233" rel="nofollow">https:&#x2F;&#x2F;oeis.org&#x2F;A014233</a><p>[2]: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Miller%E2%80%93Rabin_primality_test" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Miller%E2%80%93Rabin_primality...</a><p>[3]: <a href="https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;1004807&#x2F;" rel="nofollow">https:&#x2F;&#x2F;math.stackexchange.com&#x2F;questions&#x2F;1004807&#x2F;</a><p>[4]: <a href="https:&#x2F;&#x2F;miller-rabin.appspot.com" rel="nofollow">https:&#x2F;&#x2F;miller-rabin.appspot.com</a> or <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20260225175716&#x2F;https:&#x2F;&#x2F;miller-rabin.appspot.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20260225175716&#x2F;https:&#x2F;&#x2F;miller-ra...</a> if hugged to death
  • nh23423fefe2 hours ago
    i remember implementing miller rabin for project euler. but i still preferred the 4Gb file i produced via sieve of eratosthenes for most of the problems where i could use it.
  • MORPHOICES2 hours ago
    [dead]