Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 5.3.7 ( For which integers $n$ are there solutions to the equation $x^2 - y^2 =n$?)

Exercise 5.3.7 ( For which integers $n$ are there solutions to the equation $x^2 - y^2 =n$?)

For which integers n are there solutions to the equation x 2 y 2 = n ?

Answers

Proof. Let n be any integer such that n = x 2 y 2 for suitable integers x , y . Then n = ( x y ) ( x + y ) . We write d = x y , e = x + y , so that d , e are divisors of n such that

{ x + y = d , x y = e ,

thus e , d have same parity (since d e = 2 y ), and

{ x = d + e 2 , y = d e 2 ,

This implies that n has some divisor d such that d and n d have same parity. This is the case if n is odd, since n and 1 are both odd. This is also the case if n 0 ( mod 4 ) , because 2 and n 2 are even.

It remains only the case n 2 ( mod 4 ) , so n = 2 ( 2 k + 1 ) for some integer k . Let d be any divisor of n . If d is odd, then n d is even, and if d = 2 d is even, then n d = ( 2 k + 1 ) d is odd. So no divisor d of n is such that d and n d have same parity. This shows that in this case n = x 2 y 2 has no solution.

(More concisely, we note that x 2 0 or 1 ( mod 4 ) , thus x 2 y 2 0 , 1 or 1 ( mod 4 ) , so n = x 2 y 2 2 ( mod 4 ) .)

In the other cases,

  • If n 1 ( mod 2 ) , then

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

    where x = n + 1 2 , y = n 1 2 are integers.

  • If n 0 ( mod 4 ) , then

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

    where x = n 4 + 1 , y = n 4 1 are integers.

In both cases n = x 2 y 2 has integer solutions.

In conclusion, the equation x 2 y 2 = n has solutions if and only if n 2 ( mod 4 ) . □

User profile picture
2025-04-05 09:08
Comments