A linear congruential generator has period for every seed if and only if , every prime dividing divides , and implies . The coprimality of prevents the orbit from being trapped in a residue class; the multiplier conditions permit full-period lifting through each prime power. Combining the prime-power periods by the Chinese remainder theorem gives period . For , the multiplier criterion reduces to , together with . A positive increment alone is insufficient.
A linear congruential generator starts with an integer seed and iterates
The outputs lie in and are used as pseudorandom numbers approximating a uniform distribution. They are deterministic once the seed is fixed. The largest possible period is , since there are only states; good period alone does not establish independence or good multivariate uniformity.
The full-period criterion for a mixed congruential generator says that period for every seed occurs exactly when
For , these conditions reduce to
The multiplier must satisfy both and . A positive shift alone is insufficient: for example, a shift divisible by three cannot give period when the multiplier is one modulo three. If the required coprime shift has already been chosen, the condition on the multiplier alone is for an integer .
Pseudorandom number 2026-10-14
A pseudorandom number is an output of a deterministic algorithm chosen to imitate samples from a specified probability law. For example, a linear congruential generator returns fractions on a finite grid in . Their intended uniform distribution is an approximation, and their serial dependence must be assessed separately from the generator's period.