News for hackers. Stuff that matters.
Re:Evolution of Random Number Generators by nestorD on Sunday May 02, 2021 @01:24PM (#27017005)
From memory you don't need size to be a prime, what you need is that it is coprime with your step.

Thus, the easiest solution is to take a step-size that is prime and different from you size (that works for any size). Given the index of the current element, the next index would be `(current_index + step) % size`.

There are no comments on this comment yet.