Pollard[n_] := Module[{a,x,y,q=1,c=1,max=1000}, r:=1+Prime[Random[Integer,max]]; While[q<2, a=r; x=r; y=x; c=1; While[q<2 && c