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 m = 387058387 by evaluating d 100 , in the notations of the preceding problem.

Answers

Proof. Since 2 100 ! 1 > 2 1 0 157 is far greater than the capacity of our computer, we must avoid this calculation to evaluate d 100 .

If we define r n by

r n 2 n ! ( mod m ) , 0 r n < m ,

then r 1 = 2 and r n + 1 r n n + 1 ( mod m ) .

Moreover, r n = 2 n ! + km for some integer k , thus

( r n 1 ) m = ( 2 n ! 1 + km ) m = ( 2 n ! 1 ) m = d n .

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 d 100 = 461333 , so 461333 is a factor of m = 387058387

387058387 = 461333 × 839 .

User profile picture
2024-08-23 09:52
Comments