Implemented PollardRho algorithm and a random number generator.