Exercise 3.3.9 (Congruence $x^2 + y^2 \equiv 0 \pmod n$)

For which positive integers n do there exist integers x and y with ( x , n ) = 1 , ( y , n ) = 1 , such that x 2 + y 2 0 ( mod n ) .

Answers

Proof. If n = 1 , x 2 + y 2 0 ( mod n ) for all integers x , y . We suppose now that n > 1 .

Write n = 2 a 0 p 1 a 1 p 2 a 2 p k a k the decomposition of n in prime factors, where p 1 , p 2 , , , p k are distincts odd primes, and a 0 0 , a i > 0 for every index i = 1 , 2 , , k .

Suppose that x 2 + y 2 0 ( mod n ) , where x n = y n = 1 . Then

x 2 + y 2 0 ( mod 2 a 0 ) , (1) x 2 + y 2 0 ( mod p a i ) , i = 1 , 2 , k , (2)

If a 0 > 1 , then by Problem 8 the congruence x 2 + y 2 0 ( mod 2 a 0 ) has no solution ( x , y ) where x , y are odd. Therefore a 0 = 0 , or a 0 = 1 .

Moreover, Problem 8 shows that p i 1 ( mod 4 ) .

Conversely, suppose that n = 2 a 0 p 1 a 1 p 2 a 2 p k a k , where a 0 { 0 , 1 } , a i > 0 and p i 1 ( mod 4 ) for i = 1 , 2 , , k .

By Problem 8, for each index i = 1 , 2 , , k , there are some integers x i , y i satisfying x i p i = y i p i = 1 and

x i 2 + y i 2 0 ( mod p i a i ) .

  • If a 0 = 0 , by the Chinese Remainder Theorem, there are integers x , y such that x x i ( mod p i a i ) and y y i ( mod p i a i ) for i = 1 , 2 , k . Then

    x 2 + y 2 x i 2 + y i 2 0 ( mod p i a i ) .

    Since the p i a i are relatively prime by pairs, this implies

    x 2 + y 2 0 ( mod n = p 1 a 1 p 2 a 2 p k a k ) .

    Moreover x x i ( mod p i a i ) implies x p i = 1 . Similarly y p i = 1 . Therefore x p = y p = 1 .

  • If a 0 = 1 , there are integers x , y such that x x i ( mod p i a i ) and also x 1 ( mod 2 ) , and y y i ( mod p i a i ) for i = 1 , 2 , k , and y 1 ( mod 2 ) . Then

    x 2 + y 2 0 ( mod n = 2 p 1 a 1 p 2 a 2 p k a k ) ,

    where x p i = y p i = 1 and x 2 = y 2 = 1 . Therefore x n = y n = 1

If n > 1 , there exist integers x and y with ( x , n ) = 1 , ( y , n ) = 1 , such that x 2 + y 2 0 ( mod n ) if and only if n = 2 a 0 p 1 a 1 p 2 a 2 p k a k , where a 0 = 0 or a 0 = 1 , a i > 0 and the distinct odd primes p i satisfy p i 1 ( mod 4 ) . □

User profile picture
2024-11-02 10:36
Comments