$x^2-x+1$ has a root $\!\bmod p\,$ for infinitely many primes $p$ Prove that the equation $$x^2 - x + 1 = p(x+y)$$ has integral solutions for infinitely many primes $p$.
First, we prove that there is a solution for at least one prime, $p$. Now, $x(x-1) + 1$ is always odd so there is no solution for $p=2$. We prove there is a solution for $p=3$. If $p=3$, $y = (x-2)^2/3-1$. We get integral solutions whenever we get $x = 3m +2$, where $m$ is any integer.$\\$
We provide a proof by contradiction which is   similar to Euclid's proof of there being infinitely many primes. \Let us assume that it is is true for only finitely many primes, and name the largest prime for which the equation is true $P$.\\We set $$x = 2\cdot3\cdot5\dots P$$ $x$ is the product of all primes upto $P.\\$
Then, the term $x(x-1) + 1$ is either prime or composite. If it is prime, then we set $p = x(x-1) + 1, y = 1 - x$ and get a solution. If it is composite, we write $x(x-1) + 1 = p\times q$, where $p$ is any prime factor of $x(x-1)+1$, and $q$ is an integer, $q = (x(x-1)+1)/p$. Now, $x(x-1) + 1$ is not divisible by any prime upto $P$ since it leaves a remainder of $1$ with all of them. So, $p > P$. We set $y=q-x$ for a solution.$\\$In either case, we get a solution for a prime $p > P$, which means there's no largest prime for which this equation has solutions. This contradicts the assumption that there are solutions for only finitely many primes.
I feel like I'm missing some step. Is this correct ?

Euclid's proof of infinitely many primes easily generalizes to show that infinitely many primes divide values of $\,f(x) = x^2 -x + 1.\,$ First $\,3\mid f(2).\,$ Given primes $\,3,p_2,\ldots\,p_k\,$ that divide values of $\,f,\,$ let $\,k\,$ be their product. $\,f(k)\,$ is coprime to $\,k\,$ since $\ {\rm mod}\ k\!:\ f(k) \equiv f(0)\equiv 1.\,$ Thus choosing any prime factor of $\,f(k)\,$ yields a new prime divisor (note $\,k>1\,$ $\Rightarrow\,$ $\,f(k)>1\,$ so $\,f(k)\,$ does have a prime factor).
Clearly the same type of argument works for any polynomial $\,f(x)\in\Bbb Z[x]\,$ with $\,f(0) = \pm1$.
