# Talk:Multi-base primes

## inadequate range checking?[edit]

Hindsight is a wonderful thing. After translating the Rust entry, I am a bit concerned it is skipping a few things it should perhaps not.
Who's to say, for instance, that "ABCDEF" won't be prime in 36-16=20 bases? My translation, at least, is not checking that. --Pete Lomax (talk) 12:13, 3 July 2021 (UTC)

Nevermind, I changed the Phix entry to do a full sweep, at initially quite some hit to performance, but thankfully finding a "maxdigit" optimisation, and all the answers happen to have only decimal digits 0..9. --Pete Lomax (talk) 17:17, 3 July 2021 (UTC)

If you consider how you get a 6 digit number like "zzzzzz" where z is 35, such a number excludes any 6-digit forms in any bases below 36. So if we want at least 18 bases to be a possibility, the most significant digit of the number can at most 17, so that means a max of not base 36's 6 digit 2176782335, but the base 17 "gggggg" or 24137568. It turns out that we actually need to go down to 8 on our most significant digit to allow the max number of bases. I agree that I would have had to use at least about 24137568 for the loop range in the Julia otherwise. The change would only be to the top range of the for loop. --Wherrera (talk) 17:47, 3 July 2021 (UTC)

Phix entry updated as per the Raku entry: if we go to base 62 then non-decimal digits *do* start to appear. --Pete Lomax (talk) 14:55, 7 July 2021 (UTC)