Determine the maximum period of the following potential random number generator, if possible.
$x_{n+1} = 65x_n+1 \,\,(\text{ mod } 2048)$
This is an exctract of a big task with more RNG's and I choose this one to see if I do it correct?
I read the article on Wikipedia https://en.wikipedia.org/wiki/Linear_congruential_generator#Period_length
I would solve it like that:
First of, $1$ and $2048$ need to be relatively prime. They are relatively prime since $\gcd(1,2048)=1$
Now we need to make sure that $65-1$ is divisible by all prime factors of $2048$. Prime factors of $2048: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2$. So this is also good since $64$ is divisible by $2$.
Now what is left is that $65-1$ is a multiple of $4$ if $2048$ is a multiple of $4$. This is the case because
$\frac{2048}{4}$ you get an integer and so you also get integer for $\frac{64}{4}$.
All things checked are true so this means that the period of this generator is at most $2048$, so the maximum period is $\approx 2048$?