Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 4.1.21* (About Fermat's method of factorization)

Exercise 4.1.21* (About Fermat's method of factorization)

Let n be an odd positive integer. If n factors into the product of two integers, n = uv , with u > v and u v 64 n 4 , prove that the roots of x 2 2 n + 1 x + n = 0 are integers.

Hint. Use the identity { ( u + v ) 2 } 2 { ( u v ) 2 } 2 = uv to get bounds on the integer ( u + v ) 2 .

Answers

Proof. By hypothesis,

n = uv = ( u + v 2 ) 2 ( u v 2 ) 2 .

Since n is odd, u and v are odd, so ( u + v ) 2 and ( u v ) 2 are integers.

We know also that u v 64 n 4 , thus ( u v ) 2 4 n 4 , and u > v , so

0 < ( u v 2 ) 2 2 n .

This gives the inequalities

n < ( u + v 2 ) 2 n + ( u v 2 ) 2 n + 2 n .

Therefore

n < u + v 2 n + 2 n ,

or equivalently

0 < u + v 2 n n + 2 n n . (1)

Moreover, since n + 2 n > n ,

n + 2 n n = 2 n n + 2 n + n < 2 n 2 n = 1 .

Then the inequalities (1) give

u + v 2 1 n < u + v 2 ,

where u + v 2 is an integer, so

n = u + v 2 1 . (2)

Then u + v 2 = n + 1 = n + 1 . The relations

{ u + v = 2 n + 1 , uv = n ,

show that the integers u and v are the roots of

( x u ) ( x v ) = x 2 ( u + v ) x + uv = x 2 2 n + 1 x + n = 0 .

If n = uv , with u > v and u v 64 n 4 , the roots of x 2 2 n + 1 x + n = 0 are integers. □

Note: This problem seems related to Fermat’s method to factor an integer n by representing n as difference of two squares. This method is efficient if the factors u , v are close.

To choose two primes numbers u , v for the RSA method in cryptography, it is dangerous to take u and v too close.

To give a (very little) example, take n = 47070339749 .

Then n = 216956 , 2 n + 1 = 433914 , and the previous equation

x 2 2 n + 1 x + n = x 2 433914 x + 47070339749 = 0

has for solutions the two integers 216967 and 216947 :

sage: solve(x^2 - 433914*x + 47070339749, x)
[x == 216967, x == 216947]

so

n = 47070339749 = 216967 × 216947 ,

and the code is deciphered.

(To find the decomposition n = uv = a 2 b 2 , we can also find u = a + b and v = a b by increasing a , starting from a = n = 216957 , b = 0 , and increasing b until a 2 b 2 < n .)

User profile picture
2024-12-18 09:55
Comments