Finding integer solutions to $(x-y)^2+(y-z)^2+(z-x)^2=2022$

683 Views Asked by At

This was from round A of the Awesomemath Summer Program application. The deadline was yesterday and we can discuss the problems now.

Find all integer triples $(x,y,z)$ which satisfy $$(x-y)^2+(y-z)^2+(z-x)^2=2022$$

I tried a couple of things. First I noticed $x-y+y-z+z-x=0,$ so if we let $a=x-y, b=y-z,c=z-x$ than we have $$\begin{align} a^2+b^2+c^2&=2022 \tag1\\ a+b+c &=0 \tag2\\ (a+b+c)^2-2ab-2bc-2ca &=2022 \tag3 \end{align}$$ So, $$-2ab-2bc-2ca=2022 \tag4$$ so $$ab+bc+ca=-1011 \tag5$$

However, it is tricky to proceed from here.

I also recalled the factorization $$x^2+y^2+z^2-xy-yz-zx=\frac{1}{2}((x-y)^2+(y-z)^2+(z-x)^2)=1011 \tag6$$ This also equals $$x(x-y)+y(y-z)+z(z-x) \tag7$$ but this doesn't seem promising.

I also tried to factorize $2022=2 \cdot 3 \cdot 337$, but I am not sure what to do after prime factorizing.

So far, I feel like my first approach is the most promising, but I am not sure how to finish with it.

2

There are 2 best solutions below

3
On

I am going from here: instead of dividing two, I am going to multiple two.

$$4044=2((x-y)^2+(y-z)^2+(z-x)^2)=(2x-y-z)^2+3(y-z)^2$$

WLOG $x\ge y\ge z$ Therefore set $2x-y-z=a$ and $y-z=b$ we are finding the solution of $a^2+3b^2=4044$. After trying, we have three solutions: $(63,5),(39,29),(24,34)$. $(63,5)$ yields $x=34+z,y=5+z$, $(39,29)$ yields $x=34+z,y=29+z$, and $(24,34)$ does not yield $x\ge y\ge z$ solution. These two solutions are "somewhat equivalent." So, the solutions $x=34+z,y=5+z$ and $x=34+z,y=29+z$ if ordered $x\ge y\ge z$, or, all the solutions are $x,y,z$, when they ordered as $a\ge b\ge c$ and $a-b,b-c$ is a permutation of $5$ and $29$.

0
On

We have:

$$(x-y)^2+(y-z)^2+(z-x)^2=2(x^2+y^2+z^2)-2(xy+yz+zx)$$

$$(x+y+z)^2=x^2+y^2+z^2+2(xy+yz+zx)$$

Summing these relations we get:

$$(x-y)^2+(y-z)^2+(z-x)^2+(x+y+z)^2=3(x^2+y^2+z^2)$$

$(x-y)^2+(y-z)^2+(z-x)^2=3\times 2\times 337$

$\Rightarrow 3\times 2\times 337+(x+y+z)^2=3(x^2+y^2+z^2)\space\space\space\space\space\space(1)$

Which indicate that:

$3\big|(x+y+z)$

Relation (1) also says not all x , z and z can be a multiple of 3,because $2022$ has only 3 as a factor, but one of them, say x can be, so the sum of other two i.e y and z must be a multiple of 3. Also $\sqrt {2022}=44.96$. So $x<50$:

Now letting $x=3k$, equation (1) can be reduced as:

$3\times 2\times 337+(3k+y+z)^2=3[(3k)^2+y^2+z^2]\space\space\space\space\space\space (2)$

We value of x as:

$x=3k=3, 6, 9, 12, 15, 18, 30, 33, 36,39, 42, 45, 48$

Putting these in (2) we get an equation in terms of y and z with following restrictions:

$\begin{cases}3\big|y+z\\y<50, z<50\end{cases}$

which is easy to solve. Some examples:

$(x, y, z)=(3, 37, 32), (6,11, 40), (9,14, 43), (12, 7, 41), (15, 20, 49), (18, 13, 47), (30, 1, 35), (33, 38, 4), (36, 7, 41), (39, 10, 44), (42, 8, 37), (45, 11, 40), (48, 14, 43)$