\(\( (*\ 
      Construction\ of\ a\ sequence\ of\ random\ numbers
			using\ a\ 
        recipe\ due\ to\ Lewis*) 
a = 7^5; m = 2^31 - 1; 
    f[x_] := Mod[a*x, m]; 
x[0] = 0.3; nmax = 10000; 
    Do[x[n + 1] = f[x[n]], {n, 0, nmax}]; 

    ListPlot[Table[{n, x[n]/m}, {n, 0, nmax}]]\)\)

\(\( (*\ number\ of\ visits\ in\ nb\ bins*) 
nb = 100; 

    Do[bi[l] = 0, {l, 1, nb}]; 

    Do[bnumb = Floor[nb*x[n]/m] + 1; \ 
      bi[bnumb] = bi[bnumb] + 1, {n, 0, nmax}]; 

    uu = ListPlot[Table[{l/nb, bi[l]}, {l, 1, nb}], 
Frame -> True, \ 
        PlotRange -> All, PlotJoined -> True, 

        FrameLabel -> {"mid bin value", "number of visits", " ", 
            " "}]; \)\)