A linear congruential generator (LCG) is an algorithm that yields a sequence of pseudo-randomized numbers calculated with a discontinuous piecewise linear equation.
The linear congruential generator LCG is defined by recurrence relation:
where:
X is the sequence of pseudo-random values
m is the modulus (m > 0)
a is the multiplier (0 < a < m)
c is the increment (0 <= c < m)
X0 is the "seed" or start value (0 <= X0 < m)