find all integers $a,b,c$ such that $a^2=bc+1,$ $b^2=ca+1.$ [duplicate]

This was one of the problems in a math contest in India. This is how I tried it: Subtracting the second equation from the first one gives $a^2-b^2=bc-ca$ or $(a-b)(a+b)=c(b-a)$. $a-b=-(b-a)$. Therefore a+b has to be -c. Thus all integers satisfying the condition $a+b=-c$ are such that $a^2=bc+1$ and $b^2=ca+1$. Also if $a-b=b-a,$ it means $a=b.$ Then both $b-a$ and $a-b$ are $0.$ Hence $c$ can thus be any integer. Hence, there are two groups of integers satisfying the required condition $-a=b$ with any $c$ and $a+b=-c.$ Please let me know whether my solution is correct or not.

• Sounds good to me. – John Molokach Dec 6 '15 at 12:44
• $a=b$ with any $c$ is not a general solution: for example with $a=b=2$ and $c=3$ would give $4=6+1$, which is not correct. – Henry Dec 6 '15 at 12:47
• It completed just two hours ago – Gayatri Dec 6 '15 at 13:03

$c=-(a+b)$ is not a general solution: for example with $a=b=2$ and $c=-4$ would give $4=-8+1$, which is not correct.

Instead, in cases of $c=-(a+b)$, you need to solve $a^2=-ab-b^2+1$, i.e. $a =\frac{-b \pm\sqrt{4-3b^2}}{2}$ and that only has integer solutions when $b=-1,0,1$ in which case $a=0\text{ or }1, -1\text{ or }1, -1\text{ or }0$ and $c=1\text{ or }0, 1\text{ or }-1, 0\text{ or }-1$ respectively.

$a=b$ with any $c$ is not a general solution: for example with $a=b=2$ and $c=-4$ would give $4=-8+1$, which is not correct.

Instead, in cases of $a=b$, you need to solve $a^2=ac+1$, i.e. $a=b=\frac{c \pm\sqrt{c^2+4}}{2}$ and that only has a solution in integers when $c=0$ and so $a=b=\pm 1$.

$$a=0, \, b=-1,\, c=1$$ $$a=1, \, b=-1,\, c=0$$ $$a=-1, \, b=0,\, c=1$$ $$a=1, \, b=0,\, c=-1$$ $$a=-1, \, b=1,\, c=0$$ $$a=0, \, b=1,\, c=-1$$

$$a=-1, \, b=-1,\, c=0$$ $$a=1, \,b=-1,\, c=0$$

Assuming $b\neq a$ you gained a constraint

$$-(a+b) = c$$

This constriction is not bad, because there is no number $b = c$ such that $a^2 = bc + 1$ for integers.

It's fine to me.

• $a=1,b=0,c=0$ is a solution to $a^2 = bc + 1$ in integers – Henry Dec 6 '15 at 13:16

I tried solving came out with following results:

$(i)-(ii)$ gives $a+b+c=0$ which implies, $a^3+b^3+c^3=3abc$

Multiplying equation $(i)$ with $a$ and multiplying equation $(ii)$ with $b$ and then subtracting $(i)-(ii)$ we get $a^2+b^2+ab=1$ which can be written as $(a+b)^2-ab=1$ , which can be further written as $c^2-ab=1$.

A partial counterexample $a=-3,b=-1,c=-4$ thus $b^2=1$ while ca+1=$-11$ thus i think the condition should be $a=<b=<c$.