# Diophantine equation $x^2-xy-y^2=a^2+ab-b^2$

Prove that for any positive integers a and b equation $$x^2-xy-y^2=a^2+ab-b^2$$ has infinite many solutions in positive integers
My work
I found a solution $$(a+b,b)$$, but i don't how to prove infinitness of solutions

• Ugh. What have you attempted towards solving this question? Jul 2 '19 at 16:13
• Welcome to MSE. You'll get a lot more help, and fewer votes to close, if you show that you have made a real effort to solve the problem yourself. What are your thoughts? What have you tried? How far did you get? Where are you stuck? This question is likely to be closed if you don't add more context. Please respond by editing the question body. Many people browsing questions will vote to close without reading the comments. Jul 2 '19 at 16:24
• Since you found the solution $(a+b,b)$ then $(2a+3b,a+2b)$ is also a solution because of the automorfism $(x,y) \mapsto ( 2x+y, x+y)$ as answered by Will Jagy, when reading it I missed that so just wanted to make it more clear. In the accepted answer (a,b) are not arbitrary so you get infinite (x,y,a,b) pairs but not infinite (x,y) pairs for arbitrary (a,b) parameters Jul 3 '19 at 7:14

Similar to "Vieta Jumping" for binary quadratic form $$x^2 - k xy + y^2,$$ there is an automorphism. In the case of $$x^2 - xy - y^2,$$ the mapping, which can be repeated any number of times, is $$(x,y) \mapsto ( 2x+y, x+y)$$ Note that if the current, $$x,y > 0,$$ then $$2x+y, x+y > 0$$ as well.

The generating matrix for the automorphism group can be found visually in Conway's topograph. Traditional: given $$Ax^2 + B xy + C y^2,$$ with discriminant $$D = B^2 - 4AC$$ positive but not a square, every automorphism (with determinant $$+1$$) comes from a solution to $$\tau^2 - D \sigma^2 = 4,$$ then matrix $$M = \left( \begin{array}{cc} \frac{\tau - B \sigma}{2} & - C \sigma \\ A \sigma & \frac{\tau + B \sigma}{2} \end{array} \right)$$ With $$A=1, B=-1, C=-1, D=5, \tau = 3, \sigma = 1$$ I got $$M = \left( \begin{array}{cc} 2 & 1 \\ 1 & 1 \end{array} \right)$$

I had a drawing of this. As we can see the identity matrix as a pair of column vectors (green), we also see the matrix $$M$$ in the next pair of representations of $$1$$ ands $$-1,$$ using the same backwards slant.

• I don't get where does $\tau^2 - D \sigma^2 = 4$ is reexpressing $D = B^2 - 4AC?$ and does this kind of diagram have a name to look around more into what it means, thanks Jul 3 '19 at 2:23
• @Nadide I like the book Binary Quadratic Forms by Buell. He does the automorphism group, a traditional topic. The diagram is discussed in these books, all good: maths.ed.ac.uk/~aar/papers/conwaysens.pdf (Conway) math.cornell.edu/~hatcher/TN/TNbook.pdf (Hatcher) bookstore.ams.org/mbk-105 (Weissman) springer.com/us/book/9780387955872 (Stillwell) Jul 3 '19 at 2:33
• Sorry didn't look carefully first, I get now more of a sense why you want $\frac{\tau-\sqrt{D} \sigma}{2} \frac{\tau+\sqrt{D} \sigma}{2}=1$, I will keep these book at "hand", so much I didn't know that I didn't know, thanks once again Jul 3 '19 at 3:55

Above equation shown below:

$$(x^2-xy-y^2)=(a^2+ab-b^2)$$ --------$$(1)$$

Equation $$(1)$$ has parametric solution hence

it has infinite many numerical solution's.

$$(x,y,a,b)=[(8k^2),(10k-5),(8k^2-8k),(6k-5)]$$

For, $$k=3$$ we get:

$$(x,y,a,b)=[(72,25,48,13)$$

• How did you get that parametric solution? Jul 3 '19 at 1:39
• Since (x,y,a,b)=(5,2,3,2) is a known solution, we parameterize the given equation at (x,y,a,b)=[(5+kt),(2+t),(3-kt),(2-t)]
– Sam
Jul 3 '19 at 14:49

Solution of equation.

$$X^2-XY-Y^2=a^2+ab-b^2$$

Can be written using solutions to the Pell equation....

$$p^2-5s^2=\pm1$$

Knowing the first solutions for....

$$+1--(p;s)--(9;4)$$

$$-1--(p;s)--(2;1)$$

The following can be found by the formula.

$$p_2=9p+20s$$

$$s_2=4p+9s$$

Will make a replacement for the simplified entry....

$$k=p^2\pm6ps+5s^2$$

$$t=p^2\pm2ps+5s^2$$ And then the solutions of the equation can be written in the form...

$$X=(a+b)k^2+2bkt+at^2$$ $$Y=bk^2+2akt+(b-a)t^2$$ So the Pell equation has infinitely many solutions, it means for any number $$a,b$$ - solutions will always be and infinitely many.