# $0 \leq a^2 + b^2 - abc \leq c \implies a^2 + b^2 - abc$ is a perfect square

The following problem looks very interesting to me and I cannot even guess a solution to it. It states that:

Suppose that $a,b,c$ are three natural numbers satisfying the inequality: $0\leq a^2 + b^2 - abc\leq c$. Show that $a^2 + b^2 - abc$ is a perfect square.

Cases like $a=b$ or $a=1$ can be handled very easily, but is there any general solution? Any help shall be greatly appreciated.

• The inequalities imply that $c$ must lie between $(a^2+b^2)/(1+ab)$ and $(a^2+b^2)/ab$. For any $a, b \ge 1$, there is at most one $c$ that can satisfy those conditions. I'm not sure if that leads anywhere. – Rahul Jun 17 '12 at 6:43
• Interesting problem. I have verified it experimentally for a,b,c up to 100. – imallett Jun 17 '12 at 6:50
• I edited your title to reflect the content of the question. – davidlowryduda Jun 17 '12 at 6:58
• Regarding my previous comment, make that at most two values of $c$. I had checked that the length of the range was at most $1$ and jumped to a conclusion, but you can have $a=1$, $b=1$, $c\in\{1,2\}$. I still think for $(a,b)\ne(1,1)$ there can't be more than one solution, though. – Rahul Jun 17 '12 at 8:11

Seemingly invalid step in the proof of $\frac{a^2+b^2}{ab+1}$ is a perfect square?
This is a variant of the $ab+1$ problem, maybe devised by working backward from the solution.