0
$\begingroup$

Consider an linear congrugential generator with parameters $a$, $c$, $m$. What is the maximum number of distinct values $a x_n + c$ can take modulo $m$ when (i) $(a,m) = 1$, and, (ii) $(a,m) = d$. What does this suggest on appropriate choice(s) for $a$ in general?

Since $(a,m) = 1$ means that the $gcd(a,m) = 1$ it seems to me that the maximum number of distinct values that can be taken would be $n$. But I am not sure if this is correct, any suggestions are greatly appreciated.

1 Answers 1

0

Consider the theorem by Greenberger; Hull, Dobell, 1962) The period of LCG is $M$ iff (here $c\neq 0$)

  1. $gcd(c,M) = 1$

  2. $a\equiv 1 \mod p$ for each prime factor $p$ of $M$

  3. $a\equiv 1 \mod 4$ if $4$ divides $M$

Thus if $(a,m) = 1$ then the maximum number of distinct values $a x_n + c$ can take is $m$.