Multiple perfect squares

Algebra Level 4

Do there exist 3 distinct positive integers ( x , y , z ) (x, y, z ) such that x + y x+y , y + z y+z , z + x z+x , and x + y + z x + y + z are all perfect squares?

Yes No

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.

6 solutions

Note that if there is one solution, there are infinitely many; for if ( x , y , z ) (x,y,z) is a solution, so is ( n 2 x , n 2 y , n 2 z ) (n^2x,n^2y,n^2z) for positive integers n n .

Also, if ( x , y , z ) (x,y,z) is a solution without a square as common factor, then two of the numbers are multiples of four, and the other is one more than a multiple of four. Of the perfect squares, one is even and the other three are odd.

If we can find four distinct squares a 2 < b 2 < c 2 < d 2 a^2 < b^2 < c^2 < d^2 such that a 2 + b 2 + c 2 = 2 d 2 , a^2 + b^2 + c^2 = 2d^2, then a solution is x = ( d a ) ( d + a ) , y = ( d b ) ( d + b ) , z = ( d c ) ( d + c ) . x = (d - a)(d + a),\ \ y = (d-b)(d+b),\ \ z = (d-c)(d +c).

I found 1 6 2 + 1 9 2 + 2 1 2 = 2 2 3 2 , 16^2 + 19^2 + 21^2 = 2\cdot 23^2, leading to the choices x = 7 39 = 273 ; y = 4 42 = 168 ; z = 2 44 = 88. x = 7\cdot 39 = 273;\ \ y = 4\cdot 42 = 168;\ \ z = 2\cdot 44 = 88. Then x + y = 273 + 168 = 441 = 2 1 2 ; y + z = 168 + 88 = 256 = 1 6 2 ; z + x = 88 + 273 = 361 = 1 9 2 ; x + y + z = 273 + 168 + 88 = 729 = 2 3 2 . x + y = 273 + 168 = 441 = 21^2; \\ y + z = 168 + 88 = 256 = 16^2; \\ z + x = 88 + 273 = 361 = 19^2; \\ x + y + z = 273 + 168 + 88 = 729 = 23^2.

We are looking for distinct positive integers a , b , c , d a,b,c,d with a 2 + b 2 + c 2 = 2 d 2 a^2 + b^2 + c^2 = 2d^2 and a , b , c < d a,b,c < d . If we define α = a d \alpha = \tfrac{a}{d} , β = b d \beta = \tfrac{b}{d} , γ = c d \gamma = \tfrac{c}{d} , then α , β , γ \alpha,\beta,\gamma are rationals with 0 < α , β , γ < 1 0 < \alpha,\beta,\gamma < 1 and α 2 + β 2 + γ 2 = 2 \alpha^2 + \beta^2 + \gamma^2 = 2 .

Define u , v Q u,v \in \mathbb{Q} by the formulae α = 1 u γ \alpha = 1 - u\gamma , β = 1 v γ \beta = 1 - v\gamma , Then ( 1 u γ ) 2 + ( 1 b γ ) 2 + γ 2 = 2 γ [ ( u 2 + v 2 + 1 ) γ 2 ( u + v ) ] = 0 \begin{aligned} (1 - u\gamma)^2 + (1 - b\gamma)^2 + \gamma^2 & = 2 \\ \gamma\big[(u^2 + v^2 + 1)\gamma - 2(u+v)\big] & = 0 \end{aligned} so that γ = 2 ( u + v ) u 2 + v 2 + 1 \gamma = \frac{2(u+v)}{u^2 + v^2 + 1} Since γ > 0 \gamma > 0 and α , β < 1 \alpha,\beta < 1 we deduce that u , v > 0 u,v > 0 . Since γ < 1 \gamma < 1 we deduce that 2 ( u + v ) < u 2 + v 2 + 1 2(u+v) < u^2 + v^2 +1 , and hence that ( u 1 ) 2 + ( v 1 ) 2 > 1 (u-1)^2 + (v-1)^2 > 1 . If u , v < 1 u,v < 1 it is clear that α = 1 u γ > 1 u > 0 β = 1 v γ > 1 v > 0 \alpha = 1 - u\gamma > 1 - u > 0 \hspace{1cm} \beta = 1 - v\gamma > 1 - v > 0 Thus we obtain suitable values of α , β , γ \alpha,\beta,\gamma , from which we can retrieve suitable values of a , b , c , d a,b,c,d , by choosing (nearly) any pair of rationals u , v u,v such that 0 < u < 1 0 < v < 1 ( u 1 ) 2 + ( v 1 ) 2 > 1 0 < u < 1 \hspace{1cm} 0 < v < 1 \hspace{1cm} (u-1)^2 + (v-1)^2 > 1 This is the region in the u v uv -plane defined by the circle centre ( 1 , 1 ) (1,1) and radius 1 1 , the u u -axis and the v v -axis.

If we choose u v u \neq v , then α β \alpha \neq \beta . The conditions for γ \gamma to be distinct from α , β \alpha,\beta are more complex: ( u + v + 1 ) 2 2 ( u 2 + 1 ) ( u + v + 1 ) 2 2 ( v 2 + 1 ) (u+v+1)^2 \neq 2(u^2+1) \hspace{2cm} (u+v+1)^2 \neq 2(v^2+1) but it is easy enough to choose u , v u,v in the above region which satisfy these extra conditions. Indeed, if we pick u , v u,v in the darker shaded region, we always obtain 0 < α < β < γ < 1 0 < \alpha < \beta < \gamma < 1 . The other five regions give the other possible orderings of α , β , γ \alpha,\beta,\gamma .

For example, with u = 1 3 u = \tfrac13 , v = 4 21 v = \tfrac{4}{21} we obtain α = 16 23 β = 19 23 γ = 21 23 \alpha = \frac{16}{23} \hspace{1cm} \beta = \frac{19}{23} \hspace{1cm} \gamma = \frac{21}{23} and hence we can retrieve a = 16 a=16 , b = 19 b=19 , c = 21 c=21 and d = 23 d=23 .

Irritatingly, having done all the hard work to parametrize the solutions of the equation, I got the conditions on u , v u,v wrong initially, and made the wrong solution choice!

Mark Hennings - 4 years ago

Log in to reply

Very nice! You have effectively parametrized all possible solutions to the problem. (I fixed one typo in the first line of the first display equation. )

Arjen Vreugdenhil - 4 years ago

Very nice way to parametrize and find the general solution! If we take u = 1/4 and v = 1/5, then we recover the solution I found a = 39, b = 41 and c = 40.

Wei Chen - 4 years ago

This is the best solution so far! I wished someone could parametrize the solutions. Unless I got it wrong, why doesn't every pair of u , v u,v give suitable values for the equation? Moreover, can we add some conditions on u , v u,v so that x , y , z x,y,z are positive?

Mat Met - 4 years ago

Log in to reply

The conditions that a , b , c , d a,b,c,d are nonzero, distinct, positive, with a , b , c < d a,b,c <d , ensure that x , y , z x,y,z are nonzero, distinct and positive.

There are conditions on u , v u,v to ensure that α , β , γ \alpha,\beta, \gamma are distinct and lie in ( 0 , 1 ) (0,1) . That is why u , v u,v must be distinct and lie in the region defined by the circle and the axes. However, almost any pair of distinct rational u , v u,v in that region will give a viable solution.

Mark Hennings - 4 years ago

Nice! There is only one thing I gon't get: why are u,v<1? In other words, are there solutions where 1<u<2?

Laszlo Kocsis - 3 years, 12 months ago

Log in to reply

The actual conditions for α \alpha and β \beta to be positive are complicated, but they restrict the solutions to the region I have indicated.

Mark Hennings - 3 years, 12 months ago

"Also, if is a solution without a square as common factor, then two of the numbers are multiples of four, and the other is one more than a multiple of four. Of the perfect squares, one is even and the other three are odd." How do you know this man?

Utsav Garg - 4 years ago

Log in to reply

It appears that I may have mistyped something here-- but let me explain.

If a 2 , b 2 , c 2 a^2,b^2,c^2 are all even, then they have a common factor 2 2 2^2 . We rule out this situation, and may therefore assume that one of the number is odd--say, a 2 a^2 . But the sum 2 d 2 2d^2 is even, so that there must be precisely one other odd number--say, b 2 b^2 . Thus we get a 2 + b 2 + c 2 = odd + odd + even = 2 d 2 . a^2 + b^2 + c^2 = \text{odd} + \text{odd} + \text{even} =2d^2. Now the square of an odd number is one more than a multiple of four: ( 2 x + 1 ) 2 = 4 ( x 2 + k ) + 1 (2x+1)^2 = 4(x^2 + k) + 1 ; and the square of an even number is a multiple of four. Therefore a 2 + b 2 = ( 4 k + 1 ) + ( 4 k + 1 ) + k = 4 ( k + k + k ) + 2 = 2 [ 2 ( k + k + k ) + 1 ] = 2 d 2 , a^2 + b^2 = (4k+1) + (4k'+1) + k'' = 4(k+k'+k'') + 2 = 2[2(k+k'+k'') + 1] = 2d^2, which proves that d 2 d^2 (and therefore d d ) must be odd. Thus we have a 2 + b 2 + c 2 = odd + odd + even = 2 odd ; a^2 + b^2 + c^2 = \text{odd} + \text{odd} + \text{even} = 2\text{odd}; or a 2 + b 2 + c 2 1 + 1 + 0 2 1 2 d 2 mod 4 . a^2 + b^2 + c^2 \equiv 1 + 1 + 0 \equiv 2\cdot 1 \equiv 2d^2\ \ \text{mod 4}.

Arjen Vreugdenhil - 4 years ago

Even I got the equation. After that how do we find the solution without a computer / lots of trial and error.

Samuel Shadrach - 4 years ago

How do you find the solution?

Malcolm Rich - 4 years ago

Note: It is better to explain that "Let x + y + z = d 2 , y + z = a 2 x+y+z = d^2, y + z = a^2 hence x = d 2 a 2 x = d^2 - a^2 ". instead of making it seem magical that " x = ( d a ) ( d + 1 ) x = (d-a)(d+1) .

Calvin Lin Staff - 4 years ago
Mark Hennings
Jun 16, 2017

We are looking for distinct positive integers a , b , c , d a,b,c,d with a 2 + b 2 + c 2 = 2 d 2 a^2 + b^2 + c^2 = 2d^2 and a , b , c < d a,b,c < d . If we define α = a d \alpha = \tfrac{a}{d} , β = b d \beta = \tfrac{b}{d} , γ = c d \gamma = \tfrac{c}{d} , then α , β , γ \alpha,\beta,\gamma are rationals with 0 < α , β , γ < 1 0 < \alpha,\beta,\gamma < 1 and α 2 + β 2 + γ 2 = 2 \alpha^2 + \beta^2 + \gamma^2 = 2 .

Define u , v Q u,v \in \mathbb{Q} by the formulae α = 1 u γ \alpha = 1 - u\gamma , β = 1 v γ \beta = 1 - v\gamma , Then ( 1 u γ ) 2 + ( 1 b γ ) 2 + γ 2 = 2 γ [ ( u 2 + v 2 + 1 ) γ 2 ( u + v ) ] = 0 \begin{aligned} (1 - u\gamma)^2 + (1 - b\gamma)^2 + \gamma^2 & = 2 \\ \gamma\big[(u^2 + v^2 + 1)\gamma - 2(u+v)\big] & = 0 \end{aligned} so that γ = 2 ( u + v ) u 2 + v 2 + 1 \gamma = \frac{2(u+v)}{u^2 + v^2 + 1} Since γ > 0 \gamma > 0 and α , β < 1 \alpha,\beta < 1 we deduce that u , v > 0 u,v > 0 . Since γ < 1 \gamma < 1 we deduce that 2 ( u + v ) < u 2 + v 2 + 1 2(u+v) < u^2 + v^2 +1 , and hence that ( u 1 ) 2 + ( v 1 ) 2 > 1 (u-1)^2 + (v-1)^2 > 1 . If u , v < 1 u,v < 1 it is clear that α = 1 u γ > 1 u > 0 β = 1 v γ > 1 v > 0 \alpha = 1 - u\gamma > 1 - u > 0 \hspace{1cm} \beta = 1 - v\gamma > 1 - v > 0 Thus we obtain suitable values of α , β , γ \alpha,\beta,\gamma , from which we can retrieve suitable values of a , b , c , d a,b,c,d , by choosing (nearly) any pair of rationals u , v u,v such that 0 < u < 1 0 < v < 1 ( u 1 ) 2 + ( v 1 ) 2 > 1 0 < u < 1 \hspace{1cm} 0 < v < 1 \hspace{1cm} (u-1)^2 + (v-1)^2 > 1 This is the region in the u v uv -plane defined by the circle centre ( 1 , 1 ) (1,1) and radius 1 1 , the u u -axis and the v v -axis.

If we choose u v u \neq v , then α β \alpha \neq \beta . The conditions for γ \gamma to be distinct from α , β \alpha,\beta are more complex: ( u + v + 1 ) 2 2 ( u 2 + 1 ) ( u + v + 1 ) 2 2 ( v 2 + 1 ) (u+v+1)^2 \neq 2(u^2+1) \hspace{2cm} (u+v+1)^2 \neq 2(v^2+1) but it is easy enough to choose u , v u,v in the above region which satisfy these extra conditions. Indeed, if we pick u , v u,v in the darker shaded region, we always obtain 0 < α < β < γ < 1 0 < \alpha < \beta < \gamma < 1 . The other five regions give the other possible orderings of α , β , γ \alpha,\beta,\gamma .

For example, with u = 1 3 u = \tfrac13 , v = 4 21 v = \tfrac{4}{21} we obtain α = 16 23 β = 19 23 γ = 21 23 \alpha = \frac{16}{23} \hspace{1cm} \beta = \frac{19}{23} \hspace{1cm} \gamma = \frac{21}{23} and hence we can retrieve a = 16 a=16 , b = 19 b=19 , c = 21 c=21 and d = 23 d=23 .

Irritatingly, having done all the hard work to parametrize the solutions of the equation, I got the conditions on u , v u,v wrong initially, and made the wrong solution choice!

@Mark Hennings , we really liked your comment, and have converted it into a solution. If you subscribe to this solution, you will receive notifications about future comments.

Brilliant Mathematics Staff - 3 years, 12 months ago

@Mark Hennings Really nice solution. I don't understand how have you got the conditions for γ α \gamma \ne \alpha and γ β \gamma \ne \beta . For instance γ α \gamma \ne \alpha , I have tried to substitute and i've got: 1 u 2 ( u + v ) u 2 + v 2 + 1 2 ( u + v ) u 2 + v 2 + 1 1-u \cdot \frac{2(u+v)}{u^2+v^2+1} \ne \frac{2(u+v)}{u^2+v^2+1}

but i have obtained a different condition

Filippo Olivetti - 3 years, 11 months ago

Log in to reply

Start with your condition and simplify... α γ 1 u γ γ ( 1 + u ) γ 1 2 ( 1 + u ) ( u + v ) u 2 + v 2 + 1 2 u 2 + 2 u v + 2 u + 2 v u 2 + v 2 + 1 ( u + v + 1 ) 2 = u 2 + v 2 + 1 + 2 u v + 2 u + 2 v ( u 2 + v 2 + 1 ) + ( v 2 u 2 + 1 ) = 2 ( v 2 + 1 ) \begin{aligned} \alpha & \neq \; \gamma \\ 1 - u\gamma & \neq \; \gamma \\ (1 + u)\gamma & \neq \; 1 \\ 2(1 + u)(u + v) & \neq \; u^2 + v^2 + 1 \\ 2u^2 + 2uv + 2u + 2v & \neq \; u^2 + v^2 + 1 \\ (u + v + 1)^2 \; = \; u^2 + v^2 + 1 +2uv + 2u + 2v & \neq \; (u^2 + v^2 + 1) + (v^2 - u^2 + 1) \; = \; 2(v^2 + 1) \end{aligned} and similarly for the other condition.

Mark Hennings - 3 years, 11 months ago
Peter Macgregor
Jun 6, 2017

Diophantus of Alexandria set out a pattern for solving such problems - start out hopefully, see where the maths goes, and be perfectly content if it leads you to an answer! In this spirit let us call the three numbers we are looking for a,b and c and start with the observation that for any integer x, the three equations -

a + b + c = ( x + 1 ) 2 1 a + b = x 2 2 b + c = ( x 1 ) 2 3 a+b+c=(x+1)^2 \dots \boxed{1} \\ a+b=x^2 \dots \boxed{2} \\ b+c=(x-1)^2 \dots \boxed{3}

guarantee that three of the conditions are automatically satisfied, and so the next step is to find x so that a + c a+c is also a square. Well, taking 2 × 1 2 3 2 \times \boxed{1}-\boxed{2}-\boxed{3} gives

a + c = 2 ( x + 1 ) 2 x 2 ( x 1 ) 2 = 6 x + 1 a+c=2(x+1)^2-x^2-(x-1)^2=6x+1

So all we need to do is to find x, so that 6 x + 1 6x+1 is a square. There are an infinite number of possible values for x x which make 6 x + 1 6x+1 square, but to meet the full requirements of this problem we must check retrospectively that the integers a,b and c are indeed positive and distinct. For instance x = 20 x=20 will do because 6 x + 1 = 121 6x+1=121 which is a square, and then substituting x = 20 x=20 into our three numbered equations gives

a + b + c = 441 a + b = 400 b + c = 361 a+b+c=441 \\ a+b=400 \\ b+c=361

which are easily solved to give distinct positive integers

a = 80 b = 320 c = 41 a=80 \\ b=320 \\ c=41

which satisfy all the conditions of the problem.

That's a very nice "wishful thinking" approach :)

Calvin Lin Staff - 4 years ago
Wei Chen
Jun 3, 2017

One solution is x = 720, y = 801 and z = 880. We can check that 720 + 801 = 39^2, 801 + 880 = 41^2, 880 + 720=40^2 and 720 + 801 + 880 = 49^2.

Note that { x = 720 = 8 90 8 + 90 = 98 y = 801 = 9 89 9 + 89 = 98 z = 880 = 10 88 10 + 88 = 98 ; \begin{cases} x = 720 = 8\cdot 90 & 8 + 90 = 98 \\ y = 801 = 9\cdot 89 & 9 + 89 = 98 \\ z = 880 = 10\cdot 88 & 10 + 88 = 98;\end{cases} and we recover the perfect squares 3 9 2 , 4 0 2 , 4 1 2 , 4 9 2 39^2,40^2,41^2,49^2 by observing that { 8 = 49 41 90 = 49 + 41 9 = 49 40 89 = 49 + 40 10 = 49 39 88 = 49 + 39. \begin{cases} 8 = 49 - 41 & 90 = 49 + 41 \\ 9 = 49 - 40 & 89 = 49 + 40 \\ 10 = 49 - 39 & 88 = 49 + 39.\end{cases} There is some serious elegance going on here!

Arjen Vreugdenhil - 4 years ago

Log in to reply

Yeah, it's quite an interesting problem, I wonder if there is a general solution to this. Even for primitive solutions, there are infinite number of them. By primitive I mean x, y, z don't share common factors.

We can generate infinite number of primitive solutions by using solution of the Pell equation d^2 - 6k^2 = 1 and a = 2k-1, b = 2k + 1, c = 2k, as I discussed below. But this does not include the primitive solution you found, which is a = 16, b = 19, c = 21 and d = 23. So the question of whether a general solution exists is still out there.

Wei Chen - 4 years ago

ya how is it

Biswajit Barik - 4 years ago

Nice problem. I used it as an inspiration. If you want to think more about it visit my problem.

walter bishop - 4 years ago

Hey, thanks for posting. Just out of curiosity, how did you find it?

Mat Met - 4 years ago

Log in to reply

Nice problem. Let x + y = a^2, y + z = b^2, z + x = c^2, x + y + z= d^2, so we need a^2 + b^2 + c^2 = 2 d^2. Then I just tried for a = 2k-1, b = 2k + 1, c = 2k, which gives d^2 - 6 k^2 = 1. This is Pell's equation with n = 6, with the second smallest solution being d = 49, k = 20. From that we get a = 39, b = 41 and c = 40. Then it's easy to solve x = 720, y = 801 and z = 880.

Wei Chen - 4 years ago
Bendik Samseth
Jun 5, 2017

As all that is needed to prove that a solution exists, is to find one example, it seems quickest to just start looking for one. Wrote a Python script in about 2 mins, just guessing a solution exists with x , y , z < 1000 x, y, z \lt 1000 :

from math import sqrt
def is_square(x, eps=1e-9):
    root = sqrt(x)
    return abs(int(root) - root) < eps

n = 1000
for x in range(1, n-2):
    for y in range(x+1, n-1):
        for z in range(y+1, n):
            if is_square(x+y) and is_square(y+z) and is_square(x+z) and is_square(x+y+z):
                print(x, y, z)

x^2 +y^2 + z^2 is the equation of an solid egg-like structure. Consider an intersecting plane such that 3^2 + 4^2 = 5^2 where x = 3 and y = 4. This is the perfect 3, 4, 5 triangle. Now, rotate the triangle about the long side (z or 5). You will generate a 3-D geometric shape (an egg) which always satisfies the 3,4, 5 ratio now matter how you cut it.

Stephen Garramone - 4 years ago

The question is, does there exists positive and distinct x, y, z such that x + y = a^2 , y + z = b^2 , x + z = c^2 and x + y + z = d^2 where a,b,c and d are integers. Solve this linear system to obtain that x = d^2 - b^2,
y = a^2 - d^2 + b^2, z = d^2 - a^2 provided that a^2 + b^2 + c^2 = 2d^2. Note that (11^2) + (19^2) + (20^2) = 2(21^2) so our restrictions are satisfied if a = 11 , b = 19 , c = 20 and d = 21. From this we obtain x = 80 , y = 41 , and z = 320. To verify, we see that x + y = 121, y + z = 361, x + z = 400, and x + y + z = 441.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...