Input: n=integer to be factored Output: A factorisation of n ATTENTION: this program only stops when a factorisation is found. If the factors are too big it may go on forever! pollard(n)=x=Mod(random,n);y=x;d=1;\ while(d==1,\ for(j=1,10,x=x^2+2;y=y^2+2;y=y^2+2;d=d*(y-x));\ d=gcd(lift(d),n));\ print(d,"*",n/d) Input: n=integer to be factored j=number of iterates Output: [j, 1] if no non trivial factor is found [number of iterates which produced the first non-trivial gcd, gcd] pollard(n,j)=x=Mod(random,n);y=x;d=1;tel=0;t=j;\ while(tel1,t=tel;tel=j));\ print([t,d])