4 ms·
I didn’t know, but according to Wikipedia we don’t need to require `n` to be prime, because when it isn’t, then neither is 2ⁿ-1. https://en.wikipedia.org/wiki/M
by loup-vaillant 2y ago
I didn’t know, but according to Wikipedia we don’t need to require `n` to be prime, because when it isn’t, then neither is 2ⁿ-1. https://en.wikipedia.org/wiki/Mersenne_prime https://en.wikipedia.org/wiki/Mersenne_prime
So I prefer to shorten the definition to "A prime of the form 2ⁿ-1". It’s bloody useful that n has to be prime though: makes searching that much faster.