# When is $m^2k^2(c^2+1)^2-4mc(c^2-c+1)$ a perfect square?

Suppose, $m,k,c$ are positive integers

Conjecture : The expression $$m^2k^2(c^2+1)^2-4mc(c^2-c+1)$$ is a perfect square if and only if $m=k=1$

In the case $m=k=1$ , we get $(c-1)^4$ which is a perfect square ($0$ and $1$ are allowed)

The hard part is to show that otherwise the expression cannot be a perfect square. I tried to compare $(mk(c^2+1)\pm 1)^2$ with the given expression but this led to nowhere. The conjecture is true for $m,k,c\le 1\ 600$

I arrived at this problem by trying to prove that for positive integers $a,b,c$ with $c^2+1\mid a+b$ and $ab\mid c(c^2-c+1)$ we have $a=c$ , $b=c^2-c+1$ or vice versa.

• – Peter Jul 25 '18 at 16:54
• Anyone thinking Vieta jumping on $m$? I don't have the time to try it right now but if we can use it to prove $m=1$ then we will have made progress. – Cataline Jul 25 '18 at 19:36
• @Cataline Of course I tried this, but without success. – Peter Jul 25 '18 at 19:38

If we write $d=\gcd(m,4c(c^2-c+1))$, then there necessarily exist positive integers $a_1$ and $a_2$ such that $m=da_1^2$ and $$mk^2(c^2+1)^2-4c(c^2-c+1) = d a_2^2.$$ Writing $t=a_1k$, we thus have $$t^2 (c^2+1)^2 -a_2^2 = \frac{4c(c^2-c+1)}{d}$$ and so, taking $a_3=tda_2$ and multiplying by $t^2d^2$, $$\left( t^2 d (c^2+1) \right)^2 - a_3^2 = 4 t^2dc(c^2-c+1).$$ If we define $a_4=t^2dc^2-2c+t^2d$, then $$\left( t^2 d (c^2+1) \right)^2 - a_4^2 = 4 t^2dc(c^2+1)-4c^2.$$ If $t=d=1$, we are led to $a_3=a_4$ and so to the case $m=k=1$. Otherwise, $t^2d>1$ and hence necessarily have that $a_3 > a_4$. Checking that $a_3$ and $a_4$ have the same parity, it follows that $a_3 \geq a_4+2$. But $$\left( t^2 d (c^2+1) \right)^2 - (a_4+2)^2 = 4 t^2dc(c^2-c+1) - (4t^2d + 4(c-1)^2) < 4 t^2dc(c^2-c+1).$$ This completes the proof. This argument is essentially Runge's method in disguise.
• Exellent! Thanks sir. I have a question! Why $a_3$ and $a_4$ have same parity? – Dedaha Jul 31 '18 at 8:02