4 ms·
One application is that it's fairly cheap to take `n mod p` when `p` is on the form $2^q-1$. In particular x ≡ x mod 2^q + ⌊x/2^q⌋ (mod p). If you are maki
by thomasahle 9y ago
One application is that it's fairly cheap to take `n mod p` when `p` is on the form $2^q-1$. In particular
x ≡ x mod 2^q + ⌊x/2^q⌋ (mod p).
If you are making a hash function, and need to take mod a prime, this is useful.
Another application of slightly larger Mersennes is https://en.wikipedia.org/wiki/Mersenne_Twister https://en.wikipedia.org/wiki/Mersenne_Twister
- kristianp 9y agoI imagine these record-breaking primes are too large to be useful in a hash function though.
- thomasahle 9y agoCertainly. These are just for fun, or maybe in the future giving some motivation for some number theory conjectures. Who knows.