TITLE: Does the equation $x^2+x=a$ have an integer solution?
QUESTION [7 upvotes]: I am writing a paper on the topological structure of the Golomb space (defined here) and arrived to the following question:
Question 1. Is it true that for a number $a\in\mathbb N$ the equation $x^2+x=a$ has an integer solution $x$ if and only if for any  number $b\in\mathbb N$, coprime with $a$, the equation $x^2+x=a \mod b$ has a solution $x$ (i.e., a solution in the ring $\mathbb Z/b\mathbb Z$).
In fact, I need a more general fact.
Question $2^n$. Is it true that for any number $n\ge 0$ and any number $a\in\mathbb N$ the equation $(x^2+x)^{2^n}=a$ has an integer solution $x$ if and only if for any  number $p\in\mathbb N$, coprime with $a$, the equation $(x^2+x)^{2^n}=a \mod p$ has a solution $x$ (i.e., a solution in the ring $\mathbb Z/p\mathbb Z$).
We can also ask a more general
Problem. For which monic polynomials $f\in\mathbb Z[x]$ the following local-to-global principle holds:
$(*)$: for every $b\in\mathbb N$ the equation $f(x)=a$ has a solution in $\mathbb Z$ if and only if for any $b\in\mathbb N$, relatively prime with $a$ the equation $f(x)=a \mod b$ has a solution in the ring $\mathbb Z/b\mathbb Z$?
Remark. I have edited the second question a little bit.

REPLY [9 votes]: Let me try to answer the more general problem.
First, there will probably not be any useful statement if the polynomial is not monic. The reason is that it is almost impossible to distinguish a rational root from an integer root, as is shown by examples like $(2x-1) (x^2+1)$ where the first factor has roots modulo every prime but $2$, and the second factor has roots mod $2$, but neither factor has integer roots.
Second, there are issues with certain special Galois groups. One example is $(x^2-2)(x^2-3)(x^2-6)$. The point is that if $a$ and $b$ are nonsquares in $\mathbb F_p$, then $ab$ is always a square. A lower-degree example is $(x^3+x+1)(x^2+ 31)=0$. If the cubic has no roots mod a prime, its discriminant must be a perfect square.
The way to avoid this is to put some condition on the Galois group of the polynomial that forces the implication "every element of the Galois group fixes some point $\implies$ some point is fixed by every element of the Galois group" to hold. This holds fine for subgroups of $S_2,S_3,S_4$ and thus the implication on roots holds for monic polynomials of degree at most $4$.