(* number of tosses in one experiment: nt *)
nt=20;
(*number of experiments with nt tosses *)
ne=1000;

f[x_]:=Mod[a+b*x,m];
a=0;m=2^31-1;
b=7^5;
x[0]=3; nmax=nt*ne;
Do[x[n+1]=f[x[n]],{n,0,nmax}];
Do[co[n]=0,{n,0,nt}];
Do[s=Sum[Floor[x[(n-1)*nt+l]*2/m],{l,1,nt}];
co[s]=co[s]+1,{n,1,ne}]
<<Graphics`Graphics`
f1=BarChart[Table[N[co[n]/ne],{n,1,nt}],PlotRange->All]
f2=ListPlot[Table[{n,N[Binomial[nt,n]/(2^(nt))]},{n,0,nt}],
Prolog->PointSize[0.015],PlotRange->All]
Show[f1,f2,PlotRange->All]