suppose $n\in \Bbb Z $ then how to prove this statement:
$x^2-y^2=n$ has solution in $\Bbb Z$ IFF : $n \not \equiv 2 \pmod 4$
suppose $n\in \Bbb Z $ then how to prove this statement:
$x^2-y^2=n$ has solution in $\Bbb Z$ IFF : $n \not \equiv 2 \pmod 4$
tnx for Gerry Myerson. it's equal with this statement:
$x^2-y^2=n$ iff $ n$ is odd or $4|n$
$(x-y)(x+y)=x^2-y^2=n=ab , \exists a,b \in \Bbb Z$
so we have ($x+y=n$,$x-y=1$ or $x-y=n$,$x+y=1$ ) that $n$ must be odd or $x=\frac{a+b}{2}, y=\frac{a-b}{2}$ that so two case exists :
$I)$both $a,b$ is even so $4|ab=n$
$II)$ both $a,b$ is odd so $n=ab $ is odd
Observe that $x+y=x-y+2y$
So, $x+y,x-y$ have the parity
If they are odd, $n=x^2-y^2$ will be odd
If they are even, $n=x^2-y^2$ will be divisible by $4$
Conversely, if $n$ is odd $=2m+1$(say)
$(x+y)(x-y)=2m+1$ where $m$ is any integer
So, we can write $x+y=2m+1,x-y=1\implies x=m+1,y=m$
or $x+y=-(2m+1),x-y=-1\implies x=-(m+1),y=-m$
If $4\mid n,n=4r$(say)
So, we can write $x+y=2r,x-y=2\implies x=r+1,y=r-1$
or $x+y=-2r,x-y=-2\implies x=-(r+1),y=-(r-1)$