Triples

How many triplets of positive integers ( x , y , z ) (x,y,z) exist such that x 2 + y 2 + z 2 = 2011 x^{2}+y^{2}+z^{2}=2011 ?


The answer is 21.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Leonel Castillo
Feb 2, 2018

I will solve this by reducing this problem to the classic problem of solving x 2 + y 2 = a x^2 + y^2 = a . First, take the congruence modulo 3 to find that x 2 + y 2 + z 2 1 m o d 3 x^2 + y^2 + z^2 \equiv 1 \mod 3 . Remember that in modulo 3, squares are always congruent to 1 1 or 0 0 . So it must be that exactly one is congruent to 1 and the others are congruent to 0. But because we have perfect symmetry with the variables let's just pick y 0 m o d 3 y \equiv 0 \mod 3 , z 0 m o d 3 z \equiv 0 \mod 3 .

Let's now make the substitution y = 3 y 1 , z = 3 z 1 y = 3y_1, z = 3z_1 to get the equation x 2 + 9 y 1 2 + 9 z 1 2 = 2011 x^2 + 9y_1^2 + 9z_1^2 = 2011 . Now take the congruence modulo 9 to find x 2 4 m o d 9 x ± 2 m o d 9 x^2 \equiv 4 \mod 9 \implies x \equiv \pm 2 \mod 9 .

On the other hand, let's find an inequality for x x . The equation implies that y 2 + z 2 = 2011 x 2 y^2 + z^2 = 2011 - x^2 . This implies that 2011 x 2 > 0 2011 > x 2 44 x 2011 - x^2 > 0 \implies 2011 > x^2 \implies 44 \geq x .

But remember that x = 9 k ± 2 x = 9k \pm 2 . Let's first assume that x = 9 k + 2 x = 9k+2 . This means 44 9 k + 2 4 k 44 \geq 9k + 2 \implies 4 \geq k . So we only need to check k = 0 , 1 , 2 , 3 , 4 k =0,1,2,3,4 . In the other case 44 9 k 2 5 k 44 \geq 9k - 2 \implies 5 \geq k and in this case we only have to check k = 1 , 2 , 3 , 4 , 5 k=1,2,3,4,5 . (We don't check 0 because 9*0 - 2 is negative).

This reduces the problem to 10 computations. First, you compute 2011 x 2 2011 - x^2 for one of the 10 10 x x 's we have to consider. Then you quickly check if it is congruent to 3 mod 4 or has a prime power factor congruent to 3 mod 4 which would imply it is impossible to write it as a sum of two squares. But if the number can be written as a sum of two squares then you solve the equation 9 y 1 2 + 9 z 1 2 = 2011 x 2 9y_1^2 + 9z_1^2 = 2011 - x^2 first by dividing by 9 and then factorizing 2011 x 2 2011 - x^2 over the Gaussian integers.

This last part may be hard but actually, you only have to do it in 3 cases. When x = 29 , 7 , 43 x=29,7,43 because for the other values of x, you can quickly disqualify them by checking their normal factorization and finding factors congruent to 3 mod 4. The main solutions I found after all this are:

( 29 , 9 , 33 ) , ( 29 , 21 , 27 ) , ( 7 , 21 , 39 ) , ( 43 , 9 , 9 ) (29,9,33),(29,21,27),(7,21,39),(43,9,9) . And remember the other solutions are built by permuting these solutions so the total number of positive solutions are 3 ! + 3 ! + 3 ! + ( 3 2 ) = 21 3! + 3! + 3! + \binom{3}{2} = 21 .

Good solution. There is a small typo, x 2 ± 2 ( m o d 9 ) x^2 \equiv \pm 2 \pmod 9

Vilakshan Gupta - 3 years, 4 months ago

Log in to reply

Thaks for pointing that out. It should be x ± 2 m o d 9 x \equiv \pm 2 \mod 9 .

Leonel Castillo - 3 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...