A method for generating random (pseudorandom) numbers using the linear recurrence relation
where and must assume certain fixed values, is some chosen modulus, and is an initial number known as the seed.
A method for generating random (pseudorandom) numbers using the linear recurrence relation
where and must assume certain fixed values, is some chosen modulus, and is an initial number known as the seed.
Weisstein, Eric W. "Linear Congruence Method." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/LinearCongruenceMethod.html