# Period of a Linear congruential generator

I found by experimentation that for the pseudorandom generator described below, the period is 32 (https://repl.it/repls/EasySphericalPhysics).

$$X_0=0$$

$$X_{n+1}=(34 * X_n + 17) \bmod 97$$

Although the Hull–Dobell Theorem conditions are fulfilled which should mean that the period equals 97.

• $$17$$ and $$97$$ are relative prime

• $$34 - 1$$ is divisible by 1 (prime factors of 97)

• $$97$$ is not divisible by 4

How can this be explained.

The second condition of the Hull-Dobell theorem requires that the multiplier less $$1$$ (i.e. $$33$$ in this case) be divisible by all prime factors of the modulus. This isn't satisfied here because there's a prime factor of the modulus (namely $$97$$) which doesn't divide $$33$$.