Good day
I'm working with Linear Congruential Methods and Middle-square Method, I want to know if there is a way to choose the best seed. "Best seed" mean the max period, I know that:
Linear Congruential Method
Don't use zero
Don't use even numbers
Let $r_{1+i}=(a+cr_i) mod (m)$: $m=2^g$ where $g$ is integer; $a=1+4k$ where $k$ is integer; $c$ will be relatively prime with $m$
Middle-square Method
Don't use zero
Don't use numbers where half is formed with zeros
Partial answer: Knuth (Seminumerical algorithms, Theorem A), gives a complete characterisation for maximal period length:
The case $c=0$ is handled in Theorems B...D.
Hints for the middle-square algorithm are given in exercise/answer 3.1.6.