Calculator on this site is for learning
Calculates a sequence of pseudo-random numbers using the relation Xn + 1 = Xn + Xn-k (mod M). To use this method k initial values are needed, where k is an integer. The statistical properties of the sequence use an improvement as it is increased. This is the only method that produces periods greater than M.
First of all, this algorithm requires a previous sequence of n integers x1, x2, x3… .xn to generate a new sequence of integers starting at xn + 1, xn + 2, xn + 3…
Its recursive equation is: