Yeah, some of those formulas require a couple of semesters of some fairly abstract mathematics before the notation begins to make sense.
Also note that these guys are trying to solve a much more general problem, which makes it harder. You can use the same mechanisms, but you don’t need all that rigor, just something that’s hard for folks to guess, while not repeating.
If you look at the Python code in Wikipedia’s article, you’ve got the core generator right there. The missing pieces are the integers modulus
, seed
, and a
. Once chosen, hold these constant. Then, when you put in a value for c
, you get the next value for c
.
So the problem now boils down to, how should we choose those three fixed parameters?
-
modulus
is the number of distinct values. It should be a prime number. -
seed
, roughly speaking, is the average distance between successive values ofc
. Without further research, I think it should be roughly one half of the modulus. - Since we’re not really interested in mathematical rigor here,
a
, the multiplier, is something you can experiment with. I’d suggest another prime number, with around half as many digits asmodulus
.