Question
Solution
Basically, the formula is as follows:
number = (previous_number * constant + other_constant) mod third_constant
The three constants are carefully selected, and a typical choice is:
number = (previous_number * 214013 + 2531011) mod 215