Exercise 1.3.35* ($n = x^2 - y^2$)

Show that there exist non-negative integers x and y such that x 2 y 2 = n if and only if n is odd or is a multiple of 4. Show that there is exactly one such representation of n if and only if n = 1 , 4 , an odd prime, or four times a prime.

Answers

Proof. Let n be a non negative integer.

(if we accept n < 0 , then some other numbers as 1 , 4 , have also a unique representation.)

(a)
Existence. Assume that n = x 2 y 2 for some non negative integers x , y . For every integer x , x 2 0 , 1 ( mod 4 ) , so y 2 0 , 3 ( mod 4 ) , and x 2 y 2 0 , 1 , 3 ( mod 4 ) . Thus n is not of the form 4 k + 2 . In other words, n is odd or is a multiple of 4 .

Conversely assume that n is odd or is a multiple of 4 .

  • If n is odd, then

    n = ( n + 1 2 ) 2 ( n 1 2 ) 2

    so that n = x 2 y 2 , where x = n + 1 2 and y = n 1 2 are non negative integers.

  • If 4 n is a multiple of 4 , then

    n = ( n 4 + 1 ) 2 ( n 4 1 ) 2 = | n 4 + 1 | 2 | n 4 1 | 2

    so that n = x 2 y 2 , where x = | n 4 + 1 | and y = | n 4 1 | are non negative integers.

(b)
Unicity. Assume that n = 1 , 4 , an odd prime, or four times a prime. We know from part (a) that n = x 2 y 2 for some non negative integers x , y . We will show that this representation is unique.
  • If n = 1 , then

    1 = x 2 y 2 = ( x y ) ( x + y ) .

    Since x 2 = y 2 + 1 > y 2 , and x 0 , y 0 , we obtain x > y , thus 0 < x y x + y . Therefore x y = 1 and x + y = 1 . This gives x = [ ( x + y ) + ( x y ) ] 2 = 1 , y = ( [ ( x + y ) ( x y ) ] 2 , so that the decomposition is unique.

  • If n = 4 , then

    4 = x 2 y 2 = ( x y ) ( x + y ) .

    As previously, 0 < x y x + y , so x y = 1 , x + y = 4 , or x y = 2 , x + y = 2 . in the first case, x = 5 2 is not an integer, thus x = 2 , y = 0 : the decomposition is unique.

  • If n = p is an odd prime,

    p = x 2 y 2 = ( x y ) ( x + y ) ,

    where 0 < x y x + y . Since p is prime, x y = 1 , x + y = p , thus x = ( p + 1 ) 2 , y = ( p 1 ) 2 : the decomposition is unique.

  • If n = 8 ( n = 4 × 2 , where 2 is prime), then

    8 = x 2 y 2 = ( x y ) ( x + y ) ,

    where 0 < x y x + y . The divisors of 8 are 1 , 2 , 4 , 8 , and x y , x + y are of same parity, thus x y = 2 , x + y = 4 , so x = 3 , y = 1 : the decomposition is unique.

  • If n = 4 p , where p is an odd prime, then

    4 p = x 2 y 2 = ( x y ) ( x + y ) ,

    where 0 < x y x + y , and x y , x + y are of same parity. The divisors of 4 p are 1 , 2 , 4 , p , 2 p , 4 p . Therefore, x , y satisfy x y = 2 , x + y = 2 p : the decomposition is unique.

Conversely, assume that n is odd or is a multiple of 4 , but n 1 , n 4 , and n is not an odd prime, and is not four times a prime. We want to prove that n has at least two distinct decompositions of the form n = x 2 y 2 .

Note 0 = 1 2 1 2 = 2 2 2 2 has two decompositions. We suppose now n > 0 .

Examine first the case where n is odd. Since n 0 , n 1 , and n is not a prime, n is of the form

n = pq ,

where p is an odd prime, and q > 1 is odd. Then the equalities

n = ( n + 1 2 ) 2 ( n 1 2 ) 2 , n = ( p + q 2 ) 2 ( p q 2 ) 2

give two distinct decompositions of n : if ( n + 1 2 , n 1 2 ) = ( p + q 2 , p q 2 ) , then n = p , q = 1 , and n is a prime: this is a contradiction.

Examine now the case where n = 4 k is a multiple of 4 , where k > 0 . By hypothesis, k 1 , and k is not a prime, thus k is composite, so k = uv , v u > 1 . Then

n = 4 uv = ( uv + 1 ) 2 ( uv 1 ) 2 , n = 4 uv = ( v + u ) 2 ( v u ) 2

give two distinct decompositions of n : if ( uv + 1 , uv 1 ) = ( v + u , v u ) , then uv = v , u = 1 , so u = v = 1 : this is a contradiction.

To conclude: If n 0 is an integer,

There is no representation of n of the form n = x 2 y 2 if n is even but is not a multiple of 4 .

There is exactly one representation if and only if n = 1 , 4 , an odd prime, or four times a prime.

There are several distinct representations if n is odd or is a multiple of 4 , but n 1 , n 4 , and n is not an odd prime, and is not four times a prime. □

User profile picture
2024-06-21 10:03
Comments