Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 2.4.17* (Factorize $387058387$ by Pollard $p-1$ method)
Exercise 2.4.17* (Factorize $387058387$ by Pollard $p-1$ method)
Find a proper divisor of by evaluating , in the notations of the preceding problem.
Answers
Proof. Since is far greater than the capacity of our computer, we must avoid this calculation to evaluate .
If we define by
then and .
Moreover, for some integer , thus
This gives the following ipython code:
In [1]: from math import gcd In [2]: m = 387058387 In [3]: r = 2 ...: for n in range(2, 101): ...: r = pow(r, n, m) ...: print(n, ’=>’, gcd(r - 1, m)) ...:
which gives
2 => 1 3 => 1 4 => 1 ... 95 => 1 96 => 1 97 => 461333 98 => 461333 99 => 461333 100 => 461333
This gives , so is a factor of
□