# Zeros of polynomials modulo a non-prime

Suppose I have a set $S$ and I want to find a polynomial $p$ such that $p(s) = 0 \mod n$ if $s \in S$, and that it is non-zero modulo $n$ otherwise.

In the literature such an $S$ is sometimes called a root set (see http://www.sciencedirect.com/science/article/pii/S0195669896901249).

Finding such a polynomial is always possible if $n$ is a prime number, but if $p$ is a non-prime, it may not be.

For example, if $S = \{1,2\}$ and we try to find a polynomial $p$ such that $p(1) = p(2) = 0 \mod 6,$ then this implies that $p(4)=p(5)=0 \mod 6.$ So $\{1,2\}$ is not a root set modulo 6.

Is there some characterization of root sets (modulo a certain integer)?
Do you maybe have useful references for me?