Using a program I found one pair only x1=-1 x2=-1008, maybe there are more, but I need a step by step mathematical solution.
-
What is $(x_1,x_2)$? – S.C.B. Jan 28 '17 at 16:45
-
2Where did you find this problem? Number-theory problems that involve the current year are often contest problems, so many readers will refrain from giving too complete replies, lest they become complicit in cheating. – hmakholm left over Monica Jan 28 '17 at 16:46
-
I had this problem on my contest today, but my brain did not have the strength to solve it. :( But I got my answer now. – user410918 Jan 28 '17 at 17:00
-
This one is super easy. It ultimately boils down to factoring $2017.$ – Lucian Jan 28 '17 at 19:35
3 Answers
The discriminant is $$p^2-4q=p^2-4(2017-p)=(p+2)^2-4\cdot2018$$ which needs to be perfect square.
If $(p+2)^2-4\cdot2018=r^2\iff(p+2+r)(p+2-r)=4\cdot2018$
Now as $(p+2+r)\pm(p+2-r)$ are even and the Right Hand Side, both $(p+2+r),(p+2-r)$ have to be even
$$\dfrac{p+2+r}2\cdot\dfrac{p+2-r}2=2018=2\cdot1009$$
- 274,582
By Vieta: $x_1+x_2=-p$ and $x_1x_2=q$ so:
$x_1x_2-x_1-x_2+1=p+q+1=2018$
$(x_1-1)(x_2-1)=2018$
So you can get $x_1$ and $x_2$ by factoring $2018$.
The prime factoring of $2018$ is $2\cdot 1009$
So $2018=(\pm 1)\cdot(\pm2018)=(\pm 2)\cdot (\pm 1009)$
Which gives you $8$ solutions:
$(-1,-2017),(-2017,-1),(2,2019),(2019,2),(-1,-1008),(-1008,-1),(3,1010),(1010,3)$
- 16,027
$\begin{align}{\bf Hint}\quad x^2\! + px +q-1 \,&=\ \ {-}1\\[.1em] -\ (\, q + p\, &=\ \ \ 2017\,)\\[.1em] \hline \Rightarrow\quad { x^2\! + px - p-1} &=\, -2018\\[.1em] {\rm i.e.}\quad (x\! -\! 1)\ (x\! +\! p\!+\!1) &=\, -2018 \end{align}$
- 272,048