https://profilbaru.com/ar/Pollard's_rho_algorithm_for_logarithms