Given a polynomial $W(x)=x^2+ax+b$ with integer coefficients that satisfies the condition: for every prime $p$ there exists an integer $k$ that $p$ divides both $W(k)$ and $W(k+1)$. Prove that there exists an integer $m$ that satisfies $W(m)=W(m+1)=0$.
I am asking you to check my reasoning.
We can consider a new polynomial $P(x) = 4W(x)=(2x+a)^2+4b-a^2$. $P(k+1)-P(k)=(2(k+1)+a)^2-(2k+a)^2=4(2k+1+a)$. Consider pairs $(2(k+1)+a,2k+1+a)$ and $(2k+a,2k+1+a)$ but these are pairs of coprime numbers meaning $gcd(P(k),P(k+1))=4$ contradicting the problem's condition. Hence $P(k)=p(k+1)=0$.
Such $m$ existy only if $W(x) =x^2-(2m+1)x+m^2+m$
Let $2\mid a$, then for some integer $k$ we have $$2\mid W(k+1)-W(k) = 2k+1+a \implies 2\mid 2k+1$$ A contradiction, so $a$ is odd: $a=-2m-1$ for some integer $m$. Now let $p>2$, then exists $k$ such that $$p\mid 2(k-m)\implies p\mid k-m \implies k\equiv_p m$$
But $$0\equiv_p W(k) = k^2 +k(-2m-1) + b \equiv_p -m^2-m+b $$
So, for every $p$ we have $$b\equiv _pm^2+m$$ But this is only possible if $b=m^2+m$.