Homepage Solution manuals Ivan Niven An Introduction to the Theory of Numbers Exercise 3.6.5 (Number of ordered pairs $(x,y)$ of positive integers for which $x^2 + y^2 = n$)

Exercise 3.6.5 (Number of ordered pairs $(x,y)$ of positive integers for which $x^2 + y^2 = n$)

Suppose that n is not a perfect square. Show that the number of ordered pairs ( x , y ) of positive integers for which x 2 + y 2 = n is R ( n ) 4 . Show that if n is a perfect square then the number of such representations of n is R ( n ) 4 1 .

Answers

Proof.

(a)
Let n be a positive integer, and let S be the set of solutions ( x , y ) 2 of x 2 + y 2 = n . Put S 1 = { ( x , y ) S n x > 0 , y 0 } , S 2 = { ( x , y ) S n y > 0 , x 0 } , S 3 = { ( x , y ) S n x < 0 , y 0 } , S 4 = { ( x , y ) S n y > 0 , x 0 } ,

Since ( 0 , 0 ) is not a solution,

S = S 1 S 2 S 3 S 4 ,

and this union is a disjoint union, therefore

R ( n ) = | S | = | S 1 | + | S 2 | + | S 3 | + | S 4 | .

Moreover, the maps

φ { S 1 S 2 ( x , y ) ( y , x ) ψ { S 2 S 1 ( x , y ) ( y , x )

(rotations of angles + π 2 , π 2 , restricted to S 1 and S 2 ) satisfy ψ φ = 1 S 1 , φ ψ = 1 S 2 , thus φ is a bijection, so | S 1 | = | S 2 | , and similarly | S 2 | = | S 3 | = | S 4 | . Therefore

R ( n ) = 4 | S 1 | ,

so

R ( n ) = 4 Card { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y 0 } . (1)

Suppose that n is not a perfect square. Then there is no solution of x 2 + y 2 = n such that x = 0 or y = 0 , thus

S 1 = { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y > 0 } .

Then the equality (1) shows that

Card { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y > 0 } = R ( n ) 4 .

The number of ordered pairs ( x , y ) of positive integers for which x 2 + y 2 = n is R ( n ) 4 .

(b)
Suppose now that n = a 2 is a perfect square. Then, with the notations of part (a), S 1 = { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y 0 } = { ( a , 0 ) } { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y > 0 } .

Therefore

R ( n ) 4 = | S 1 | = 1 + Card { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y > 0 } ,

so

Card { ( x , y ) 2 x 2 + y 2 = n , x > 0 , y > 0 } = R ( n ) 4 1 .

If n is a perfect square then the number of ordered pairs ( x , y ) of positive integers for which x 2 + y 2 = n is R ( n ) 4 1

User profile picture
2024-11-28 09:44
Comments