Help finding integer squares in parametric quadratic equation

24 Views Asked by At

Find all integer $a$ such as equation $x^2 - 2019x + 2018a + 1 = 0$ has integer roots. Tried to solve it by using Vieta theorem. Here is what I got: $$\begin{cases}x_1+x_2=-2019\\ x_1*x_2=2018a+1\end{cases}$$ $$x_1*x_2 + x_1+x_2=2018a-2018$$ $$x_1*x_2 + x_1+x_2=2018(a-1)$$ Here I'm stuck

1

There are 1 best solutions below

0
On

If there are integer roots meant:
$x^2 - 2019x + 2018a + 1$ $=(x-\frac{2019}{2})^2+\frac14 (8072 a - 4076357)$
So $4076357-8072 a$ has to be $\ge0$ and a perfect square.
As $8072=8\cdot 1009$ and $n^2$ can only give remainders $0,1,4$ modulo $8$, but $4076357\equiv 5\pmod 8$, so $4076357-8072 a$ can't be a perfect square.
Answer: $\emptyset$ (no such $a$ exists)