Find all positive integers $(x,y)$ such that $x^2+y^2=2017(x-y)$
Problem
Source: Azerbaijan BMO TST 2018, D2 P1
Tags: number theory
01.08.2023 15:56
Maybe try factoring out $x^2 + y^2$ then it would probably be easier.
01.08.2023 23:28
falantrng wrote: Find all positive integers $(x,y)$ such that $x^2+y^2=2017(x-y)$ $\color{blue}\boxed{\textbf{Answer: (1540,315),(477, 315)}}$ $\color{blue}\boxed{\textbf{Proof:}}$ $\color{blue}\rule{24cm}{0.3pt}$ $$x^2+y^2=2017(x-y)...(I)$$$$\Rightarrow x^2<2017x$$$$\Rightarrow x<2017...(II)$$By $(I):$ $$\Rightarrow 2017(x-y)> 0$$$$\Rightarrow x>y$$$$\Rightarrow y=x-k, k\in\mathbb{Z}^+, x>k$$In $(I):$ $$\Rightarrow x^2+x^2-2xk+k^2=2017k$$$$\Rightarrow 2x^2-2xk+k^2-2017k=0$$$$\Rightarrow x=\frac{2k\pm \sqrt{4k^2-4\times 2\times (k^2-2017k)}}{4}$$$$\Rightarrow x=\frac{2k\pm 2\sqrt{2\times 2017k-k^2}}{4}$$$$\Rightarrow x=\frac{k\pm \sqrt{k(4034-k)}}{2}$$$$\Rightarrow k(4034-k)\text{ is a perfect square}$$$$k=pt^2\Rightarrow 4034-k=p\ell ^2$$$$\Rightarrow gcd(k,4034-k)=gcd(k,4034)=p\Rightarrow p|4034=2\times 2017$$By $(II):$ $$2017>x>k\ge p$$$$\Rightarrow p|2$$$$\Rightarrow p=1\text{ or }2$$$\color{red}\boxed{\text{If }p=1:}$ $$\Rightarrow k=t^2, 4034-k=\ell ^2$$$$\Rightarrow 4034=\ell ^2+t^2$$Making cases we get: $$(t,\ell)=(35,53),(53,35)$$$\color{green}\boxed{\text{If }t=35:}$ $$\Rightarrow x=\frac{35^2\pm 35\times 53}{2}$$$$\Rightarrow x=1540 \text{ or }-315$$$$\Rightarrow x=1540 \Rightarrow y=1540-35^2=315$$$$\Rightarrow \boxed{(1540,315) \text{ is a solution}}$$$\color{green}\boxed{\text{If }t=53:}$ $$\Rightarrow x=\frac{53^2\pm 35\times 53}{2}$$$$\Rightarrow x=2332\text{ or }477$$By $(II):$ $$\Rightarrow x=477>k=53^2(\Rightarrow \Leftarrow)$$$\color{red}\boxed{\text{If }p=2:}$ $$\Rightarrow k=2t^2, 4034-k=2\ell ^2$$$$\Rightarrow 4034=2k^2+2\ell^2$$$$\Rightarrow 2017=k^2+\ell^2$$Making cases we get: $$(t,\ell)=(9,44),(44,9)$$$\color{green}\boxed{\text{If }t=9:}$ $$\Rightarrow x=\frac{2\times 9^2\pm \sqrt{2\times 9\times 44}}{2}$$$$\Rightarrow x=477 \text{ or }-315$$$$\Rightarrow x=477\Rightarrow y=477-2\times 9^2=315$$$$\Rightarrow \boxed{(477,315)\text{ is a solution}}$$$\color{green}\boxed{\text{If }t=44:}$ $$\Rightarrow x=\frac{2\times 44^2\pm \sqrt{2\times 9\times 44}}{2}$$$$\Rightarrow x=2332 \text{ or }1540$$By $(II):$ $$\Rightarrow x=1540>k=2\times 44^2(\Rightarrow \Leftarrow)$$ $$\Rightarrow \boxed{(1540,315),(477,315) \text{ are the only solutions}}_\blacksquare$$$\color{blue}\rule{24cm}{0.3pt}$
08.10.2023 20:40
Let's write the equality like that; (x-y)²+2xy=2017(x-y) 2017(x-y)-(x-y)²=2xy (x-y)(2017-x+y)=2xy We will equal the divisors, the divisors of 2xy. And we can get answer like that too. Answer will be (1540;315) (477;315)
17.05.2024 00:01
Sketch: Write $x = da$, $y=db$, where $a>b$ and $\gcd(a,b) = 1$. Then $d(a^2 + b^2) = 2017(a-b)$. Observe $\gcd(a^2 + b^2, a-b) = 1$ or $2$, so $a^2 + b^2$ divides $4034$. Since every prime congruent to $1$ mod $4$ (as well as $2$) has a unique representation as a sum of two squares, it just remains to guess $a$ and $b$ from $a^2 + b^2 = 2017$ and $a^2 + b^2 = 4034$.