how to solve $x^2-y^2=(2n-1)^2$

86 Views Asked by At

If $n$ is known,and $x,y,n$ belong to $\mathbb{N}^+$. What is $x$ and $y$? I know there exists a answer, for example,when $n=111$, $x=6161$, $y=6160$, but I do not know if the answer is unique.

1

There are 1 best solutions below

0
On

My take:

Assuming $a, b$ whole numbers, let replace $x=a^2+b^2$ and $y=2ab$ and we get $2n-1=a^2-b^2$, (or $2n-1=b^2-a^2$)

The only limitation on $a, b$ is that one is odd and the other even, and $a>b$

Example: a=4, b=3 results x=25, y=24, and n=4