# How can I convert this equation

How can I convert this equation: $$321^2 - 196^2 = 64625$$ to be in this form: $$X^2 - Y^2 + X = 64625$$

Whereas $$X$$ and $$Y$$ are Odds and $$X > \sqrt{64625}$$

I tried to find $$X$$ value by testing the values from 255 until 321 and I found $$X=257$$ and $$Y=41$$. So I would like to asking the mathematicians if there is any mathematical solution to find $$X$$ and $$Y$$ values?

• "Convert this equation" - what is that supposed to mean? The first equation has no relevance. – Peter Foreman Apr 16 at 20:56
• Yes, it's equal but I just need to change the equation to be in the form $X^2 - Y^2 + X$ and I would like to know if there is any mathematical solution to do that ? Thanks – al3ndaleeb Apr 16 at 20:59
• @PeterForeman Is't impossible ? or my question was wrong ? – al3ndaleeb Apr 16 at 21:10
• I'm quite sure the solution you gave is the only one, but I don't know how to prove it. – Peter Foreman Apr 16 at 21:11
• @PeterForeman Thanks alot for your reply. I will try to read and search and I hope some one guide me or correct my understanding. – al3ndaleeb Apr 16 at 21:15

Times the equation by $$4$$, add 1 & complete the square $$\begin{eqnarray*} 4X^2+4X+1-4Y^2=4 \times 64625+1 \end{eqnarray*}$$ which gives $$\begin{eqnarray*} (2X+1)^2-(2Y)^2=\color{red}{(2X-2Y+1)}\color{blue}{(2X+2Y+1)}=258501=\color{red}{433} \times \color{blue}{597}. \end{eqnarray*}$$ etc ...
• You can also use the factorization $$\color{red}{1}\cdot 258501.$$ That gives $X=Y= 64625.$ – Thomas Andrews Apr 16 at 21:50
• ... or $1299\times199$ to get $(X,Y)=(374,-275)$, or $597\times433$ to get $(X,Y)=(257,-41)$ or $258501\times1$ to get $(X,Y)=(64625,-64625)$. – Servaes Apr 16 at 22:21