<s>[INST] If $ab \mid c(c^2-c+1)$ and $c^2+1 \mid a+b$ then prove that $\{a, b\}=\{c, c^2-c+1 \}$ If $ab \mid c(c^2-c+1)$ and $c^2+1 \mid a+b$ then prove that $\{a, b\}=\{c, c^2-c+1 \}$ (equal sets), where $a$, $b$, and $c$ are positive integers.
This is math contest problem (I don't know the source). I was struggling to solve this, but I cannot find a way to make it easier. Can you help me?
All I did was like this:
$$a+b=d(c^2+1)=d(c^2-c+1+c) \\ c(a+b)=dc(c^2-c+1)+dc^2 \\ c(a+b)=deab+dc^2=d(eab+c^2)$$
I suppose this is a quadratic in $c$ and determine its discriminant. But it doesn't make the problem any easier!
 [/INST] Suppose we have:
$m^2k^2(c^2+1)^2-4mc(c^2-c+1)=t^2$
$(m^2k^2(c^2+1)^2-t)(m^2k^2(c^2+1)^2+t)=4mc(c^2-c+1)$
We may have a system of equations as follows:
$m^2k^2(c^2+1)^2-t=4mc$
$m^2k^2(c^2+1)^2+t=c^2-c+1$
Summing two equations we get:
$2m^2k^2(c^2+1)^2=4mc+c^2-c+1$
$k^2=\frac{2mc+(c^2-c+1)/2}{2m^2(c^2+1)^2}$
Now problem reduces to : what is condition for $2mc+(c^2-c+1)/2$ to be a perfect square.The discriminant of quadratic relation $2mc+(c^2-c+1)/2≥0$ will give a range of value for m, which is finally the condition for initial relation to be a perfect square.
</s>