A power pseudo-random number generator is the following: start with a prime p, exponent d>1 and seed x0 such that (d,p-1)=1. Then form xn+1=xnd(mod p) for each n.
a)Determine the period of the random number generator in terms of p, d and x0.
b)Also find what is the maximum possible period for a given prime p, and what values of p and x0 should be chosen to achieve this maximum.