<s>[INST] How many integers solutions does $x^2 + xy - y^2 = 1$ have? Also, if we know if a binary form represents an integer $n$, is there an algorithm to find all the solutions?
 [/INST] Multiply equation with 4: $$4x^2+4xy-4y^2=4$$ so
$$(2x+y)^2-5y^2=4$$
$$(2x+y-2)(2x+y+2)=5y^2$$ Clearly $\gcd(x,y)=1$. Let prime $p\mid \gcd(2x+y-2,2x+y+2)$
then $p\mid 4$ (so $p\mid y$). Let $y=2z$, so $$(x+z-1)(x+z+1)=5z^2$$ 
Let prime $q\mid \gcd(x+z-1,x+z+1)$, then $q\mid 2$ and thus $2\mid z$ and $2\mid x-1$. Now we have $z=2t$ and $x=2s+1$ so
$$(s+t)(s+t+1)=5t^2$$
Since $s+t$ and $s+t+1$ are consecutive we have $$s+t = a^2\;\;\wedge \;\;s+t+1=5b^2$$ or  $$s+t = 5a^2\;\;\wedge \;\; s+t+1=b^2$$ where $a,b$ are relatively prime such that $t=ab$.
I believe you can finish from here...
</s>